fix(release): give the analyzer job the bash it was written for - #279
Merged
Conversation
The publish-analyzer job declares `container:`, and a container job's default shell is `sh`, not the `bash` a runner-hosted job gets. Its build step opens with `set -euo pipefail`, which dash rejects: the 0.40.0 release died on that first line with "Illegal option -o pipefail", 59 seconds in, having compiled nothing. The job is gated on `release_created`, so it had never once run before that release — cancelled in the run that added it, skipped in the next. Its first execution was also its first failure, and it fails every time, not intermittently. Declaring the shell for the whole job rather than the one broken step keeps a later step from silently inheriting dash again. publish-helm is the other container job and carries the same trap, but it uses no bash-only syntax, so it stays untouched here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesRelease shell configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 0.40.0 release failed.
Publish manifest-analyzerdied in 59 seconds having compiled nothing:publish-analyzerdeclarescontainer:, and GitHub defaults a container job's shell tosh(dash), not thebasha runner-hosted job gets. The build step opens withset -euo pipefail, which dash rejects outright, so it exited on its own first line.This is deterministic, not flaky. The job is gated on
release_created == 'true', so it had never executed before: it was cancelled in the run that introduced it and skipped in the run after. Its first execution was the 0.40.0 release, and it will fail identically on every release until this lands.The build itself is sound — compiling all three platforms and running the
--versionassertion under bash succeeds. The shell was the only defect.The fix
defaults: run: shell: bashon the job, rather thanshell: bashon the one broken step, so a step added later cannot silently inherit dash again.publish-helmis the othercontainer:job and has the identical latent trap, but it uses no bash-only syntax today. Left untouched to keep this hotfix narrow.What the failure cost
ghcr.io/configbutler/gitops-reverser:0.40.0oci://ghcr.io/configbutler/charts/gitops-reverser0.40.0v0.40.0The image and chart shipped;
publish-releasenever ran, so the release stayed a draft.Note for recovery: re-running the failed job does not help — a re-run uses the workflow file from the triggering commit, which still has the bug. This fix has to ride out on a subsequent release, and the stranded v0.40.0 draft should be deleted.
Validation
task lint(incl. actionlint),task test(77.9%, baseline 78.0%),task test-e2e(69 of 91 specs, 0 failed) all pass. Reproduced the cause directly:sh -e -c 'set -euo pipefail'exits 2 withIllegal option -o pipefail; the same line underbash -e -csucceeds.🤖 Generated with Claude Code
Summary by CodeRabbit