gha: add guardrails timeouts on all jobs#48629
Merged
thaJeztah merged 1 commit intomoby:masterfrom Oct 10, 2024
Merged
Conversation
We had a few "runaway jobs" recently, where the job got stuck, and kept running for 6 hours (in one case even 24 hours, probably due some github outage). Some of those jobs could not be terminated. While running these actions on public repositories doesn't cost us, it's still not desirable to have jobs running for that long (as they can still hold up the queue). This patch adds a blanket "2 hours" time-limit to all jobs that didn't have a limit set. We should look at tweaking those limits to actually expected duration, but having a default at least is a start. Also changed the position of some existing timeouts so that we have a consistent order in which it's set; making it easier to spot locations where no limit is defined. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
|
Wondering if there's a linter for this (similar for the "should have a top-level default permissions"); do you know, @crazy-max ? |
crazy-max
approved these changes
Oct 10, 2024
tianon
reviewed
Oct 10, 2024
| permissions: | ||
| contents: read | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
Intentional double blank line? 👀
Member
Author
There was a problem hiding this comment.
oh! very intentionally not intentional.
Oh! I know what happened; I first tried if it would accept a top-level timeout-minutes (similar to permissions), because that would make the most logical place to put a default.
But unfortunately it doesn't, so then I picked "after every runs-on as a conventions" (closest to "top level").
Member
Author
There was a problem hiding this comment.
There you go:
This was referenced Oct 10, 2024
This was referenced Oct 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We had a few "runaway jobs" recently, where the job got stuck, and kept running for 6 hours (in one case even 24 hours, probably due some github outage). Some of those jobs could not be terminated.
While running these actions on public repositories doesn't cost us, it's still not desirable to have jobs running for that long (as they can still hold up the queue).
This patch adds a blanket "2 hours" time-limit to all jobs that didn't have a limit set. We should look at tweaking those limits to actually expected duration, but having a default at least is a start.
Also changed the position of some existing timeouts so that we have a consistent order in which it's set; making it easier to spot locations where no limit is defined.