Skip to content

automation: do not fail backport retries when nothing needs retrying - #27

Merged
kaniini merged 1 commit into
edera/6.18-ltsfrom
automation/fix-retry-empty
Oct 12, 2026
Merged

kaniini merged 1 commit into
edera/6.18-ltsfrom
automation/fix-retry-empty

Conversation

@kaniini

@kaniini kaniini commented Oct 12, 2026

Copy link
Copy Markdown

The retry job of the 6.18-lts nightly has failed on every run since #21 merged (Oct 10, 11 and 12).

retry-backports.sh passes the PR numbers it collects through grep -xE '[0-9]+', and the script runs under set -o pipefail. When no mainline PR is labelled backport-waiting and no backport PR is stale, grep matches nothing and exits 1, so the script fails. That is the usual night. lts-backport-merged.yml fails 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.sh run the script against a fake gh and cover:

  • nothing waiting and nothing stale;
  • PRs that are waiting;
  • stale PRs, both with and without --stale;
  • one PR that is both waiting and stale, which is dispatched only once.

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.

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.
@kaniini
kaniini requested a review from azenla October 12, 2026 20:01
@kaniini
kaniini merged commit 7c5f670 into edera/6.18-lts Oct 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants