Use documentation formatter for rspec in devcontainer CI#305
Merged
yahonda merged 1 commit intoMay 19, 2026
Merged
Conversation
`devcontainers/ci@v0.3` runs `runCmd` via `docker exec -t`, which gives the container a TTY. Ruby on a TTY sets `STDOUT.sync = true`, so rspec's progress formatter (which prints `.` per example with no newline) is flushed per character. The action's log capture treats each flush as a separate line, so a full spec run ends up with thousands of timestamped lines that each contain a single ANSI-wrapped dot. Pass `SPEC_OPTS="--format documentation"` only for this workflow's `rake spec` invocation. The documentation formatter prints one full line per example (via `puts`, which includes a newline), so the action records one tidy log line per test instead of one per dot. Local `.rspec` is unchanged. `.rspec` is shared with local development and other workflows (`test.yml`, `test_11g*.yml`, `test_gemfiles.yml`, `ruby_head.yml`, `jruby_head.yml`, `truffleruby.yml`) which run rspec without the docker-exec TTY layer and where progress dots batch correctly. Limiting the override to the devcontainer workflow avoids changing what everyone else sees locally. Mirrors rsim/oracle-enhanced#2802. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
devcontainers/ci@v0.3runsrunCmdviadocker exec -t, which gives the container a TTY. Ruby on a TTY setsSTDOUT.sync = true, so rspec's progress formatter (which prints.per example with no newline) is flushed per character. The action's log capture treats each flush as a separate line, so a full spec run ends up with thousands of timestamped lines that each contain a single ANSI-wrapped dot (^[[32m.^[[0mrepeated).Pass
SPEC_OPTS=\"--format documentation\"only for this workflow'srake specinvocation. The documentation formatter prints one full line per example (viaputs, which includes a newline), so the action records one tidy log line per test instead of one per dot. Local.rspecis unchanged.Mirrors rsim/oracle-enhanced#2802.
Why not change
.rspec.rspecis shared with local development and other workflows (test.yml,test_11g*.yml,test_gemfiles.yml,ruby_head.yml,jruby_head.yml,truffleruby.yml) which run rspec without the docker-exec TTY layer and where progress dots batch correctly. Limiting the override to the devcontainer workflow avoids changing what everyone else sees locally.Test plan
devcontainerworkflow and confirm the "Boot dev container and run tests" log shows one line per example (test name) instead of one line per dot.🤖 Generated with Claude Code