Conversation
When KPD rebases all pending PR branches after an upstream commit lands
(on bpf-next/master, bpf/master) or after a vmtest CI update, hundreds
of workflow runs get triggered within seconds, which may cause various
glitched due to increased stress on the runners.
Add a stagger script that runs as the first step of the set-matrix job
and detects the "storm" condition by checking:
- This is a PR synchronize event (force-push rebase, not a new PR)
- The base branch was updated within the last 30 minutes (KPD just
mirrored upstream)
- Active workflow runs (queued + in-progress) are at least half the
number of open PRs, indicating a bulk rebase rather than normal
organic CI activity
When all conditions are met, the script sleeps for random 1-15 minute
intervals in a loop. As runs complete or get cancelled the ratio drops
and waiting runs proceed naturally. A hard cap of 2 hours prevents
indefinite waiting.
Because the workflow already uses cancel-in-progress on a per-branch
concurrency group, a newer force-push will cancel a sleeping set-matrix
job before any expensive build/test work starts.
During normal operation (developer pushes, single PR rebases, new PRs)
the storm condition is never true and the script exits immediately with
zero delay.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
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.
When KPD rebases all pending PR branches after an upstream commit lands (on bpf-next/master, bpf/master) or after a vmtest CI update, hundreds of workflow runs get triggered within seconds, which may cause various glitched due to increased stress on the runners.
Add a stagger script that runs as the first step of the set-matrix job and detects the "storm" condition by checking:
When all conditions are met, the script sleeps for random 1-15 minute intervals in a loop. As runs complete or get cancelled the ratio drops and waiting runs proceed naturally. A hard cap of 2 hours prevents indefinite waiting.
Because the workflow already uses cancel-in-progress on a per-branch concurrency group, a newer force-push will cancel a sleeping set-matrix job before any expensive build/test work starts.
During normal operation (developer pushes, single PR rebases, new PRs) the storm condition is never true and the script exits immediately with zero delay.
Assisted-by: Claude:claude-opus-4-6