Repository navigation
ci(release): accept a later first-parent commit's green run on the same package tree (proposal A) - #2891
Open
abrichr wants to merge 1 commit into
Open
ci(release): accept a later first-parent commit's green run on the same package tree (proposal A)#2891abrichr wants to merge 1 commit into
abrichr wants to merge 1 commit into
Conversation
…me package tree (proposal A) newest_green.py now accepts a successful push run on main for any first-parent commit between a package's subject and the tip, when the package tree there is identical (git diff --quiet) and the package's own jobs ran and passed. The merge queue pushing several merges at once leaves the subject with no run of its own; this stranded openadapt-flow 4.1.0. Runs that skipped the package's jobs, runs off the first-parent path, other branches, events and forks stay refused, and a tree change after the subject fails closed.
This branch has not been deployed
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.
From: Grok
Implements proposal A from
scripts/ci/post_merge_batching.md, which Richard approved at 1:43 PM ET Dec 1.What changes
scripts/ci/newest_green.py(used by release-package.yml, release-program-graph.yml and release-and-publish.yml) now accepts a successful push run onmainfor any first-parent commit C between a package's subject S and the tip, when all of these hold:git merge-base --is-ancestor);git diff --quiet S C -- paths); a mismatch refuses the release (fails closed);main, this repository, success) andjob_problemsfinds the package's own jobs run and passed.The newest qualifying C wins. S's own runs are always looked up, as before. Later commits are found among the 100 most recent successful push runs, and at most 5 later runs' job lists are fetched, so the API cost stays bounded.
Why A alone
A merge-queue push that lands several merges starts one push run, for its last commit, and its
scopediffs against the previous tip, so it runs every changed package's jobs. That is what stranded openadapt-flow 4.1.0: subject29215d8f(#2882) has no push run of its own, while run 46707764790 on10d283ad(same push, identicalpackages/flowtree) ran the flow jobs. B (scope against the last green run) and C (cancelling superseded runs) are not in this PR.desktop-release.ymlis unchanged.Not weakened
Every existing filter and the per-package job requirement are unchanged. A later green run that skipped the package's jobs is still refused, as are runs off the first-parent path, on other branches, from other events, or from forks.
Tests
tests/test_newest_green.pycovers these cases against a real temporary git repo: a later run accepted, a later run without the jobs refused, an off-path commit refused, branch/event/fork refused, a tree change refused, the subject's own run, newest wins, and the lookup bound. Local:tests/test_newest_green.py tests/test_release_plan.py tests/test_kernel_ci.py tests/test_desktop_release_subject.py tests/test_packages_concurrency.py, 92 passed.Dry run against live main (read-only API): types, agent, verify, kernel, desktop and launcher resolve as before. Flow will resolve to run 46707764790 on
10d283adonce it finishes green.