Skip to content

gh-132912: Set 15 min timeout on GHA Hypothesis CI #132914

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

Merged
merged 2 commits into from
Apr 25, 2025

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Apr 25, 2025

Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

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

timeout-minutes is currently set to 60. Lowering to 20/30 would make sense.

@bedevere-app
Copy link

bedevere-app bot commented Apr 25, 2025

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@vstinner
Copy link
Member Author

timeout-minutes is currently set to 60. Lowering to 20/30 would make sense.

--timeout option is the maximum duration of a single test file, whereas timeout-minutes: 60 is the overall timeout for the step.

  • python -m test --fast-ci uses a timeout of 10 minutes (--timeout 600)
  • python -m test --slow-ci uses a timeout of 20 minutes (--timeout 1200)

I chose the middleground: 15 minutes :-) Other GHA jobs use the fast CI option, so 10 minutes.

@AA-Turner
Copy link
Member

Ah, I misunderstood: the intent is to set a 15-minute per-test timeout. Keeping the overall at 60 makes more sense then, though recent runs have completed in under 10 minutes, so we could consider lowering to e.g. 30m.

Are there any other GHA / CI jobs that don't use a per-test timeout value or --{fast,slow}-ci?

A

@vstinner
Copy link
Member Author

Ah, I misunderstood: the intent is to set a 15-minute per-test timeout

Would you mind to change your review? You requested changes and now the PR is marked as "Unresolved review".

@vstinner
Copy link
Member Author

vstinner commented Apr 25, 2025

Aha, the change worked as expected on the Hypothesis CI. It displays the traceback where the test hangs:

...
0:18:30 load avg: 0.00 [429/429/1] test_remote_pdb worker non-zero exit code (Exit code 1)
test_breakpoints (test.test_remote_pdb.PdbConnectTestCase.test_breakpoints)
Test setting and hitting breakpoints. ... ok
test_connect_and_basic_commands (test.test_remote_pdb.PdbConnectTestCase.test_connect_and_basic_commands)
Test connecting to a remote debugger and sending basic commands. ... ok
test_handle_eof (test.test_remote_pdb.PdbConnectTestCase.test_handle_eof)
Test that EOF signal properly exits the debugger. ... ok
test_help_system (test.test_remote_pdb.PdbConnectTestCase.test_help_system)
Test that the help system properly sends help text to the client. ... ok
test_keyboard_interrupt (test.test_remote_pdb.PdbConnectTestCase.test_keyboard_interrupt)
Test that sending keyboard interrupt breaks into pdb. ... Timeout (0:15:00)!
Thread 0x00007fe5d5917740 [python] (most recent call first):
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/subprocess.py", line 2019 in _try_wait
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/subprocess.py", line 2061 in _wait
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/subprocess.py", line 1275 in wait
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/subprocess.py", line 1129 in __exit__
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_remote_pdb.py", line 492 in test_keyboard_interrupt
...

@vstinner
Copy link
Member Author

Are there any other GHA / CI jobs that don't use a per-test timeout value or --{fast,slow}-ci?

Yes, there are other CI jobs running tests with no timeout:

$ grep -- '-m test' .github/workflows/*|grep -v -- --timeout|grep -v pythoninfo
.github/workflows/build.yml:        "${VENV_PYTHON}" -m test \
.github/workflows/build.yml:          "$BUILD_DIR/host-python/bin/python3" -m test test_sysconfig test_site test_embed
.github/workflows/build.yml:          "$BUILD_DIR/cross-python/bin/python3" -m test test_sysconfig test_site test_embed
.github/workflows/reusable-tsan.yml:      run: ./python -m test --tsan -j4
.github/workflows/reusable-tsan.yml:      run: ./python -m test --tsan-parallel --parallel-threads=4 -j4

But I don't know these CIs, so I prefer to leave them unchanged for now.

@vstinner vstinner enabled auto-merge (squash) April 25, 2025 13:15
@vstinner vstinner merged commit eb2e430 into python:main Apr 25, 2025
41 checks passed
@vstinner vstinner deleted the hypothesis_timeout branch April 25, 2025 13:29
@miss-islington-app
Copy link

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 25, 2025
…2914)

(cherry picked from commit eb2e430)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

bedevere-app bot commented Apr 25, 2025

GH-132937 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 25, 2025
vstinner added a commit that referenced this pull request Apr 25, 2025
…#132937)

gh-132912: Set 15 min timeout on GHA Hypothesis CI (GH-132914)
(cherry picked from commit eb2e430)

Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants