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

GH-103180: Set a timeout for every job in GitHub Actions #130375

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Feb 20, 2025

As a half-workaround to GHA job hangs, this sets an explicit timeout on every job, meaning that it can be restarted after a sane period, rather than the default 6 hour (360 minute) allowance. This has a marginal benefit of freeing up CI resource quicker on such hangs, as we fail far sooner.

I've also standardised job names to use hyphens instead of the current mix of underscores and dashes, and made the order of inputs more consistent in a couple of cases.

Most notably, this means that if the required 'Check whether the needed jobs succeeded or failed' job hangs/fails, it can be restarted in 5 minutes, rather than pushing an empty commit or closing/reopening and triggering the full test suite again.

A

See also:

@AA-Turner AA-Turner changed the title Set a timeout for every GitHub Actions job Set a timeout for every job in GitHub Actions Feb 20, 2025
@@ -137,6 +137,7 @@ jobs:
name: Free-Threaded (Debug)
needs: interpreter
runs-on: ubuntu-24.04
timeout-minutes: 90
Copy link
Member Author

Choose a reason for hiding this comment

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

Note 90 minutes used here rather than 60, for consistency with the other two JIT jobs.

@AA-Turner AA-Turner changed the title Set a timeout for every job in GitHub Actions GH-103180: Set a timeout for every job in GitHub Actions Feb 20, 2025
@terryjreedy
Copy link
Member

I am not familiar with .yml, but definitely approve of the goal.

@hugovk hugovk added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Feb 21, 2025
@hugovk hugovk merged commit d0a1e5c into python:main Feb 21, 2025
70 checks passed
@miss-islington-app
Copy link

Thanks @AA-Turner for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @AA-Turner and @hugovk, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker d0a1e5c222f9f43b492b28806e2a185a50d64500 3.13

@miss-islington-app
Copy link

Sorry, @AA-Turner and @hugovk, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker d0a1e5c222f9f43b492b28806e2a185a50d64500 3.12

@AA-Turner AA-Turner deleted the gha-timeout branch February 21, 2025 15:16
@hugovk
Copy link
Member

hugovk commented Feb 21, 2025

@AA-Turner Please could you do the backports?

@AA-Turner
Copy link
Member Author

I think we need the other backports merged first, then Miss Islington might work?

A

@hugovk
Copy link
Member

hugovk commented Feb 21, 2025

Please could you check #130367? Then let's retry.

AA-Turner added a commit to AA-Turner/cpython that referenced this pull request Feb 22, 2025
@bedevere-app
Copy link

bedevere-app bot commented Feb 22, 2025

GH-130431 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 Feb 22, 2025
AA-Turner added a commit to AA-Turner/cpython that referenced this pull request Feb 22, 2025
@bedevere-app
Copy link

bedevere-app bot commented Feb 22, 2025

GH-130432 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Feb 22, 2025
AA-Turner added a commit that referenced this pull request Feb 22, 2025
AA-Turner added a commit that referenced this pull request Feb 22, 2025
@AA-Turner
Copy link
Member Author

@AA-Turner Please could you do the backports?

Backports (eventually....) done

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.

5 participants