Skip to content

Fail the devcontainer CI job when rake spec fails#2801

Merged
yahonda merged 1 commit into
rsim:masterfrom
yahonda:devcontainer-ci-fail-fast
May 19, 2026
Merged

Fail the devcontainer CI job when rake spec fails#2801
yahonda merged 1 commit into
rsim:masterfrom
yahonda:devcontainer-ci-fail-fast

Conversation

@yahonda
Copy link
Copy Markdown
Collaborator

@yahonda yahonda commented May 19, 2026

Summary

.github/workflows/devcontainer.yml's runCmd is a multi-line bash script with no set -e, so a non-zero exit from bundle exec rake spec does not propagate. The script keeps running, executes bundle exec rubocop, and the script's exit code becomes RuboCop's exit code. As long as RuboCop is clean, GitHub Actions marks the job green even when rspec is red.

Run 26084989755 hit this: 4 ORA-01805 failures in rake spec, but the job was reported as success because RuboCop passed.

Add set -e so the first non-zero exit aborts the script and surfaces through devcontainers/ci as a job failure.

Notes

Test plan

The runCmd is a multi-line bash script with no `set -e`, so a non-zero
exit from `bundle exec rake spec` does not propagate. The script keeps
running, executes `bundle exec rubocop`, and the script's exit code
becomes RuboCop's exit code. As long as RuboCop is clean, GitHub
Actions marks the job green even when rspec is red.

Run 26084989755 hit this: 4 ORA-01805 failures in rake spec, but the
job was reported as success because RuboCop passed.

Add `set -e` so the first non-zero exit aborts the script and surfaces
through the action as a job failure.
@yahonda yahonda merged commit 97fbf7f into rsim:master May 19, 2026
12 checks passed
@yahonda yahonda deleted the devcontainer-ci-fail-fast branch May 19, 2026 08:50
yahonda added a commit to rsim/ruby-plsql that referenced this pull request May 19, 2026
`.github/workflows/devcontainer.yml`'s `runCmd` is a multi-line bash
script with no `set -e`, so a non-zero exit from
`bundle exec rake spec` does not propagate. The script keeps running,
executes `bundle exec rubocop`, and the script's exit code becomes
RuboCop's exit code. As long as RuboCop is clean, GitHub Actions
marks the job green even when rspec is red.

Add `set -e` so the first non-zero exit aborts the script and surfaces
through `devcontainers/ci` as a job failure. Mirrors
rsim/oracle-enhanced#2801.

Scope kept intentionally minimal: one `set -e` line. `-u` risks
tripping on unset-but-harmless variables and the immediate bug is
just exit-code propagation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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