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

TST: CI instability (xref upstream breakage from setuptools+numpy+astropy) #4224

Closed
neutrinoceros opened this issue Nov 19, 2022 · 4 comments · Fixed by #4226
Closed

TST: CI instability (xref upstream breakage from setuptools+numpy+astropy) #4224

neutrinoceros opened this issue Nov 19, 2022 · 4 comments · Fixed by #4226
Assignees
Labels
bug tests: running tests Issues with the test setup

Comments

@neutrinoceros
Copy link
Member

neutrinoceros commented Nov 19, 2022

Bug report

Bug summary

yt/visualization/tests/test_fits_image.py started failing on certain platforms a few hours ago, see for instance
https://github.com/yt-project/yt/actions/runs/3504488379/jobs/5870201144

It seems that the on-demand-import wrapper around astropy is crashing the test with

ImportError: This functionality requires the astropy package to be installed.

However astropy is indeed installed in those jobs (see the logs). There were no recent changes (less than 24h) in the test itself or the fits_image.py module, astropy wasn't upgraded since the last successful job, and I haven't been able to reproduce this problem locally thus far.

@neutrinoceros neutrinoceros added bug tests: running tests Issues with the test setup blocker Highest priority level labels Nov 19, 2022
@neutrinoceros
Copy link
Member Author

So, another library that I maintain, unrelated to yt, began failing tests with a suspiciously similar error:

E       ImportError: Convolution C extension is missing. Try re-building astropy.

And pulling the thread leads to pypa/setuptools#3693
This issue affects a lot of projects downstream of numpy, so the best course of action for us is probably to just wait it out.

@neutrinoceros
Copy link
Member Author

That said, if yt on-demand-imports mechanism didn't swallow the initial ImportError message completely, it would have saved me a couple hours of vain research, so I guess that's an easy actionable on our side that could close this issue (when CI is stable again)

@neutrinoceros neutrinoceros changed the title BUG: fits_image test is unstable TST: CI instability (xref upstream breakage from setuptools+numpy+astropy) Nov 20, 2022
@neutrinoceros
Copy link
Member Author

a final note for now: in Python 3.11, we could leverage this feature: https://docs.python.org/3/whatsnew/3.11.html#pep-678-exceptions-can-be-enriched-with-notes

This would be useful if we can manage to keep things tidy on earlier versions too.

@neutrinoceros
Copy link
Member Author

neutrinoceros commented Nov 23, 2022

The situation just got resolved with the release of setuptools 65.6.1
I'll keep this ticket open still, and close it with a PR to improve how error messages are displayed when importing extra dependencies fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug tests: running tests Issues with the test setup
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant