[Backport release-24.11] ci/check-cherry-picks: fail without proper cherry-pick#411743
Merged
wolfgangwalther merged 9 commits intorelease-24.11from May 28, 2025
Merged
Conversation
We recently moved the $commits variable out of a "subshell in a herestring", let's do the same for the list of branches, where errors would be silently swallowed as well. Also reformat the expressions slightly, we have enough line-length. (cherry picked from commit e2a3792) (cherry picked from commit 92ff241)
The default is to checkout a contributors fork as "origin", thus the NixOS/nixpkgs remote is most likely named differently. But not everybody keeps their fork's main branches up-to-date all the time. Thus the script would fail locally. (cherry picked from commit 2fea2bb) (cherry picked from commit 63b1cc8)
Using a `tree:0` filter instead of `blob:none` reduces the checkout time from over 3 minutes to about 45 seconds. The required trees/blobs will then be fetched on-demand. This on-demand fetching creates additional output for `git range-diff` on stderr, so we hide that. This only happens the first time it's run, so we don't need to adjust the other calls - which will still return any real errors, should they happen. (cherry picked from commit e575364) (cherry picked from commit 331bbc4)
This makes the job significantly faster when the commit can't be found on master or staging directly. Before this change, the script would have had to iterate through 20+ release branches before finding the latest one. With lazy fetching for git enabled, this would take a few minutes. (cherry picked from commit a9b718b) (cherry picked from commit bcf8f3f)
When cherry-picking without -x or not cherry-picking at all, the check-cherry-picks job would usually remain green. This is annoying to deal with for reviewers, because "all green" still needs attention - have all commits been cherry-picked properly? If a commit was not cherry-picked correctly, either without -x or not at all, because it's a genuine commit to begin with, the reviewers attention is required anyway. Thus we can also let the job fail in this case. (cherry picked from commit dfaefc0) (cherry picked from commit d630bf4)
1 task
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.
Bot-based backport to
release-24.11, triggered by a label in #411737.