Skip to content

fix(release): give the analyzer job the bash it was written for - #279

Merged
sunib merged 1 commit into
mainfrom
fix/e2e-artifact-perms-hang
Jul 27, 2026
Merged

fix(release): give the analyzer job the bash it was written for#279
sunib merged 1 commit into
mainfrom
fix/e2e-artifact-perms-hang

Conversation

@sunib

@sunib sunib commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

The 0.40.0 release failed. Publish manifest-analyzer died in 59 seconds having compiled nothing:

shell: sh -e {0}
/__w/_temp/….sh: 1: set: Illegal option -o pipefail
##[error]Process completed with exit code 2

publish-analyzer declares container:, and GitHub defaults a container job's shell to sh (dash), not the bash a runner-hosted job gets. The build step opens with set -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 --version assertion under bash succeeds. The shell was the only defect.

The fix

defaults: run: shell: bash on the job, rather than shell: bash on the one broken step, so a step added later cannot silently inherit dash again.

publish-helm is the other container: 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

Artifact State
Image ghcr.io/configbutler/gitops-reverser:0.40.0 Published
Chart oci://ghcr.io/configbutler/charts/gitops-reverser 0.40.0 Published
GitHub Release v0.40.0 Stranded draft — carries install/crds/sbom assets, no analyzer binaries
Tag v0.40.0 Does not exist (a draft release creates no tag)

The image and chart shipped; publish-release never 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 with Illegal option -o pipefail; the same line under bash -e -c succeeds.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved release build reliability by standardizing command execution in the publishing workflow.
    • Prevented shell compatibility issues from interrupting build steps.

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>
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 639ec409-93e5-4f68-8b8f-79fcd290e05c

📥 Commits

Reviewing files that changed from the base of the PR and between 1b57505 and 1b2ac2d.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The publish-analyzer container job in the release workflow now explicitly uses Bash for all run: steps, supporting commands that rely on Bash-specific options.

Changes

Release shell configuration

Layer / File(s) Summary
Configure Bash for analyzer publishing
.github/workflows/release.yml
The publish-analyzer job sets defaults.run.shell to bash for its command steps.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: setting the analyzer release job to use Bash instead of the container default shell.
Description check ✅ Passed The description covers the bug, root cause, fix, validation, and release impact, so it is mostly complete despite some optional template sections being omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/e2e-artifact-perms-hang

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sunib
sunib merged commit 8bb4490 into main Jul 27, 2026
19 checks passed
@sunib
sunib deleted the fix/e2e-artifact-perms-hang branch July 27, 2026 21:51
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.

1 participant