Repository navigation
ci: cancel superseded Packages runs on main unless the push changes Desktop - #1415
Merged
Merged
Conversation
…esktop A push to main whose commits mention packages/desktop/ keeps its own concurrency group and is never cancelled, because desktop-release.yml waits for the Packages run of the newest first-parent commit that changed Desktop (#1398). Every other push to main shares one group with cancel-in-progress, so a newer push cancels the older run instead of queueing behind it. Merge queue groups and dispatches are never cancelled. tests/test_packages_concurrency.py keeps the Desktop exception in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub truncates a push payload's commit list at 20 entries, so a large push could hide a packages/desktop change from the toJSON check and have its run cancelled. Such a push now keeps its own group, like a Desktop change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit added the guard to packages.yml but left the test asserting the old expression, so it failed. The test now requires !github.event.commits[19] in both the group and cancel-in-progress. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Update: a push with 20 or more commits now keeps its own group and is never cancelled. GitHub truncates the push payload's commit list at 20, which could hide a packages/desktop change. The guard is |
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.
Why
Packages runs on
mainwere never cancelled, so every push queued a full run behind the previous ones.Baseline over the last 24 completed
mainpush runs (medians):In the last 48 hours
maingot 137 first-parent pushes. Only 12 of them changedpackages/desktop.The only reader that needs a particular
maincommit's own Packages run isdesktop-release.yml. It waits for the push run of the newest first-parent commit that changedpackages/desktop(#1398).What changes
packages.ymlconcurrency:mainwhose payload mentionspackages/desktop/(any commit's file lists, or even a message): keeps its ownpackages-<sha>group and is never cancelled.main: sharespackages-main-without-desktopwithcancel-in-progress, so a newer push cancels the older run.The Desktop test is deliberately conservative. A false "Desktop" match only means a run isn't cancelled.
tests/test_packages_concurrency.pykeeps the Desktop exception, the per-SHA fallback, and the rule that queue and dispatch runs are never cancelled.Savings
I replayed the last 48 hours of first-parent push times against the 51-minute median run:
maintraffic.What this gives up
A non-Desktop commit that is superseded within the hour no longer gets its own green or red result on
main; the next commit's run covers the same tree plus more. With the merge queue (#1412), each group is tested before it lands.Coordination
I've told the session moving the release trigger to
workflow_run.workflow_runalso fires for cancelled runs, so that trigger should act only on a successful run for a Desktop-changing first-parent commit. This PR changes no release workflow, and never cancels a release run or the run for a Desktop-changing commit.Verified
tests/test_packages_concurrency.pyandtests/test_desktop_release_subject.pypass.🤖 Generated with Claude Code