Cap what a single fork pull request can spend - #21
Merged
Conversation
This workflow is reachable from a fork pull request and had neither a concurrency group nor a job timeout, so it inherited GitHub's defaults for both: unlimited concurrent runs, and **six hours** per job. On paid Blacksmith runners that is a real number rather than a theoretical one — 6 job runs at the six-hour ceiling is 36 compute-hours for a single push, and without a concurrency group a contributor pushing five times held five complete sets at once rather than superseding the previous one. The repo now requires approval for every external contributor's fork PR, so nothing external starts without a deliberate click. This is the second half: the approval gate decides *who* runs, and these two settings decide *how much* a run that has been approved can cost. It bounds our own pushes too, which is where most of the waste actually was. Sized against measurement rather than a guess. Over the last six runs the slowest job here is 30s; 20 minutes leaves generous headroom while turning the worst case from 36 compute-hours into about 2. A job that hits 20 minutes is not a slow job, it is a stuck one.
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.
Cap what a single fork pull request can spend
This workflow is reachable from a fork pull request and had neither a
concurrency group nor a job timeout, so it inherited GitHub's defaults for
both: unlimited concurrent runs, and six hours per job. On paid
Blacksmith runners that is a real number rather than a theoretical one —
6 job runs at the six-hour ceiling is 36 compute-hours for a single
push, and without a concurrency group a contributor pushing five times held
five complete sets at once rather than superseding the previous one.
The repo now requires approval for every external contributor's fork PR, so
nothing external starts without a deliberate click. This is the second half:
the approval gate decides who runs, and these two settings decide how
much a run that has been approved can cost. It bounds our own pushes too,
which is where most of the waste actually was.
Sized against measurement rather than a guess. Over the last six runs the
slowest job here is 30s; 20 minutes leaves generous headroom while turning
the worst case from 36 compute-hours into about 2. A job that hits 20
minutes is not a slow job, it is a stuck one.
Change
concurrencygroup keyed on workflow + ref, withcancel-in-progress: truetimeout-minutes: 20on all 4 job definitionsWorst case per push
Test plan
maintimeout-minutes