Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freeze xarray version given update causes crash #190

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Conversation

ashjbarnes
Copy link
Collaborator

New (24-9-0) xarray update causes error when calling bathymetry. A "strict" flag is added to one of the dask function calls which causes a crash. Need to freeze the version of xarray to fix for now, until we patch ahead of updating to new xarray version.

Bug found by @manishvenu

New (24-9-0) xarray update causes error when calling bathymetry. A "strict" flag is added to one of the dask function calls which causes a crash. Need to freeze the version of xarray to fix for now, until we patch ahead of updating to new xarray version
Copy link
Contributor

@navidcy navidcy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn’t it too strict? Why remove all previous versions of xarray as well? Is it necessary?

pyproject.toml Outdated
@@ -14,7 +14,7 @@ dependencies = [
"netCDF4",
"numpy >= 1.17.0, < 2.0.0",
"scipy >= 1.2.0",
"xarray",
"xarray == 2024.7.0",
Copy link
Contributor

@navidcy navidcy Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not <=?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are older versions of xarray that also don’t work from memory. Safer to force it to one we know does work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the issue really? Is it documented? Or the error that one gets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy to reproduce, just run the tests like this one which used to pass before update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test you point above is from a different PR. So I'm confused @ashjbarnes. How do we know that the error in there is from the xarray version?

@navidcy
Copy link
Contributor

navidcy commented Oct 2, 2024

Can we rename the PR to better describe what happened? Eg something like “Add upper bound compatibility for xarray”?

@ashjbarnes ashjbarnes changed the title Update pyproject.toml freeze xarry version given update causes crash Oct 2, 2024
@navidcy navidcy changed the title freeze xarry version given update causes crash Freeze xarray version given update causes crash Oct 2, 2024
Copy link
Contributor

@navidcy navidcy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to approve an upper bound compat requirement (e.g. <=X.Y.Z). It would be much better if the PR or an issue documented the precise error with xarray versions beyond 2024.7.0 so we know whether we fixed it in the future. At the moment the only info I see is "error when calling the bathymetry" but if I wanted to fix it I'm not sure what I should fix.

I think imposing strict lower bound compatibility just on the basis "from memory" is a bit too much. If at some point we find something that requires a lower bound compatibility we can address it then (either fixing it or imposing the lower bound then)?

What do you think @ashjbarnes?

@ashjbarnes
Copy link
Collaborator Author

Sure, I don't mean to argue I just think this PR in some form needs go through ASAP so that the package works again for new installs, and the main branch passes tests again.

@navidcy
Copy link
Contributor

navidcy commented Oct 3, 2024

Sure, I don't mean to argue I just think this PR in some form needs go through ASAP so that the package works again for new installs, and the main branch passes tests again.

As I said:

I'm happy to approve an upper bound compat requirement (e.g. <=X.Y.Z).

Can we do that?

@navidcy
Copy link
Contributor

navidcy commented Oct 3, 2024

I'm also happy for somebody else to review and ignore my comments! No problem!

@navidcy
Copy link
Contributor

navidcy commented Oct 3, 2024

This PR closes issue #191

@navidcy navidcy linked an issue Oct 3, 2024 that may be closed by this pull request
@navidcy
Copy link
Contributor

navidcy commented Oct 3, 2024

@ashjbarnes I reproduced the error and documented it in #191.

@navidcy navidcy merged commit 81b9ef8 into main Oct 3, 2024
6 checks passed
@navidcy navidcy deleted the freeze-xarray-version branch October 3, 2024 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xarray v2024.09.0 breaks tests
2 participants