Repository navigation
fix(ci): source the retry helper in the release-neutral opener - #1684
Merged
Merged
Conversation
The lane's first live dispatch (run 36054453452) failed at `gh pr create`
with `retry: command not found`, exit 127.
`retry` is a bash FUNCTION exported through BASH_ENV by the setup-env
composite action. The opener's job deliberately skips setup-env -- `gh` is
preinstalled and opening a PR needs no toolchain -- so the function was
simply never in scope. prepare-hotfix.yml's PR job had already solved
this the same way and its comment even says so ("the retry helper is
sourced from the checkout"); I copied the `retry ... -- gh pr create`
call without the `source` line that makes it work.
Sources `.github/scripts/retry.sh` from the checkout, with the same
`# shellcheck source=/dev/null` directive prepare-hotfix.yml uses.
The accompanying test walks every step of the opener job and requires any
that calls `retry` to source the helper, so the coupling is pinned rather
than remembered. No existing shape test could have caught this: they all
assert what a step says about itself, and the step said `retry` quite
correctly -- it was the environment that lacked it. Only running the
workflow surfaced it, which is the second defect this bootstrap has found
that way (the first was gate 3 refusing the changelog mirror).
Refs: #1676
Release-neutral guard — verdictThis change is release-neutral. Every published derivation is byte-identical to
Files carried to
Changelog. Untouched — nothing for gate 2 to normalize.
|
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.
Description
The release-neutral lane's first live dispatch failed. Run 36054453452, at
gh pr create:retryis a bash function exported throughBASH_ENVby thesetup-envcomposite action. The opener's job deliberately skipssetup-env—ghis preinstalled and opening a PR needs no toolchain — so the function was never in scope.prepare-hotfix.yml's PR job had already solved this, and its comment even says so ("the retry helper is sourced from the checkout"). I copied itsretry … -- gh pr createcall without thesourceline that makes it work.Type of Change
fix-- Bug fixChanges Made
Sources
.github/scripts/retry.shfrom the checkout before theretrycall, with the same# shellcheck source=/dev/nulldirectiveprepare-hotfix.ymluses, and a comment explaining why this job cannot rely onBASH_ENV.The test walks every step of the opener job and requires any that calls
retryto source the helper, so the coupling is pinned rather than remembered.Why no existing test caught it: all 28 shape assertions pass what a step says about itself, and the step said
retryquite correctly — it was the environment that lacked it. Only running the workflow surfaces this class of defect. That is now twice in this bootstrap: the first was gate 3 refusing the changelog mirror that gates 1 and 2 were widened to admit.Changelog Entry
No changelog needed. This fixes a defect in an unreleased feature whose own
## Unreleasedentry (added in #1678) already describes the lane; a separate entry for "the thing we just added now works" would be noise. Carrying no changelog also keeps this PR trivially release-neutral.Testing
just precommitexit 0, includingactionlint+shellcheckover the workflowManual Testing Details
TDD: test added and confirmed RED (
retrycalled with nosource), then fixed, then GREEN. Exit codes read from redirected files, not through pipes.Not yet proven end-to-end — the opener still has not successfully opened a PR. That is the next step after this merges, and it is the real test.
Checklist
CHANGELOG.md— n/a, see Changelog Entry aboveAdditional Notes
This needs an
--adminmerge, and it is the bootstrap's second and last bypass. The circularity is unavoidable: the opener is what makes amainPR App-authored and therefore approvable, so a broken opener cannot open the PR that fixes itself. Once this is onmain, the lane can carry its own future changes — including re-dispatching for the unbound register amendment onbugfix/1668-unbound-1261-cve-batch.This PR is release-neutral by the lane's own contract (one workflow file, one test file, no changelog, no
assets/), so once the opener works it would qualify to travel by the lane itself.Refs: #1676