Repository navigation
automation: do not fail backport retries when nothing needs retrying - #27
Merged
Merged
Conversation
retry-backports.sh filters the pull request numbers it collects through grep under pipefail. When no mainline pull request is waiting and no backport is stale, grep matches nothing and exits 1, so the script fails. That is the usual case: the retry job has failed on every nightly run of edera/6.18-lts since it was added, and lts-backport-merged.yml fails the same way whenever a backport merges with nothing waiting. Let an empty list through, and add tests for the script against a fake gh, including the empty case.
azenla
approved these changes
Oct 12, 2026
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.
The
retryjob of the 6.18-lts nightly has failed on every run since #21 merged (Oct 10, 11 and 12).retry-backports.shpasses the PR numbers it collects throughgrep -xE '[0-9]+', and the script runs underset -o pipefail. When no mainline PR is labelledbackport-waitingand no backport PR is stale, grep matches nothing and exits 1, so the script fails. That is the usual night.lts-backport-merged.ymlfails the same way whenever a backport merges while nothing is waiting.The fix lets an empty list through:
{ grep -xE '[0-9]+' || true; }.New tests in
.github/scripts/tests/retry-backports.test.shrun the script against a fakeghand cover:--stale;The old script fails 3 of these tests and the fixed one passes all 6. The automation self-test now runs them. shellcheck and actionlint are clean.