-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
TST: add timeouts for github actions tests and wheel builds. #27899
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
Conversation
@pytest.mark.skipif( | ||
threading.active_count() > 1, | ||
reason="skipping test that uses fork because there are multiple threads") | ||
@pytest.mark.skipif( | ||
NOGIL_BUILD, | ||
reason="Cannot safely use fork in tests on the free-threaded build") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed in this CI run that despite the skip above, CPython was still warning about an unsafe use of fork, so I think it's probably safer to just always skip this test on the free-threaded build.
I reran the hanging test today, and it passed. The problem may have been upstream. |
IMO it's worth having these timeouts for heisenbugs and other infrequent hangs. Also |
Agree. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good idea, +1 in principle. Note that the first job I checked was the cp313t
smoke test in linux.yml
, and pytest-timeout
didn't actually show up. If you want it there, please add it in .github/meson_actions/action.yml
. If not, please go ahead and merge I'd say.
Added a 10 minute timeout and |
Awesome, CI is passing. I didn't re-trigger all the wheel builds because I haven't touched them since they passed in 9169099. |
Takes close to 90 minutes on windows. Some of the other builds are variable, sometimes verging on 50 minutes. |
Let's pull this in. Please ping me if anyone notices spurious timeouts or if the timeouts prove to be unhelpful. |
Thanks Nathan, lets give this a shot. We will need to track the nightlies to see if any problems come up. |
This is an attempt to track down the hang reported in #27872.
pytest-timeout
sets a per-test timeout that also prints a C stack trace if it kills a timed out test runner. It looks like a few years ago there were issues using pytest-timeout and pytest-xdist together, but they seem to have been fixed.I added it to
test-requirements.txt
since it's a pure-python dependency and should be harmless even if it's not needed. I can also justpip install
it in the wheel testing script if that would be preferred.I'm passing
--durations
and--timeout
for all the wheel builds because it seems useful to me to always have this information and to always timeout if a single test takes longer than 30 minutes. I can also just do it for the free-threaded build if reviewers would prefer only doing it there.