Scope the pre-Rspec wait barrier to Rspec's actual dependencies #patch - #32
Draft
wesrich wants to merge 1 commit into
Draft
Scope the pre-Rspec wait barrier to Rspec's actual dependencies #patch#32wesrich wants to merge 1 commit into
wesrich wants to merge 1 commit into
Conversation
`Run Rspec Tests` only needs gems/Ruby, apt packages, yarn/node_modules, compiled assets, the Playwright browser, and the parallel test DBs. The `wait-all: true` immediately before it also blocked on Rubocop, ESLint, Brakeman, Dependency Audit, and Project Stats, even though none of those publish anything Rspec reads — they report their own check results independently later in the job. Measured across two real bgea_volunteer_care CI runs, every Rspec dependency was ready well before the old barrier released, but Brakeman (and once, Rubocop's slim_lint step) was consistently the last background step to finish, and Rspec started within ~2ms of it finishing every time. That's ~11s of pure idle time on a 32vcpu run and ~22s on an 8vcpu run, wasted on every CI run of every app using this workflow. Replaced the barrier with a `wait:` scoped to Rspec's real dependencies (adding `id:`s to Compile Assets, Install Playwright Chromium Browser, and Setup Parallel Databases so they can be referenced). Rubocop/ESLint/ Brakeman/Dependency Audit/Project Stats keep running in the background concurrently with Rspec instead of gating it. To preserve correctness, replaced the later `wait: [save-asset-cache]` with `wait-all: true` so those steps are still joined before the job's final parallel block — otherwise a lint/security failure could go unnoticed and steps.project-stats.outputs.table could be read before it's populated. Co-Authored-By: Claude Sonnet 5 <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.
Why
The
wait-all: trueimmediately beforeRun Rspec Testsinrails-ci.ymlblocks on every background step launched so far in the job — including Rubocop, ESLint, Brakeman, Dependency Audit, and Project Stats. None of those publish anything Rspec reads: they report their own check results independently later in the job (Brakeman via reviewdog, Rubocop via GitHub-format output, Project Stats via a laterPublish Project Stats Checkstep).Measured across two real
bgea_volunteer_careCI runs, every dependency Rspec actually needs (gems/Ruby, apt packages, yarn/node_modules, compiled assets, the Playwright browser, parallel test DBs) was ready well before the old barrier released, but Brakeman (and once, Rubocop's slim_lint step) was consistently the last background step to finish — and Rspec started within ~2ms of it finishing every time. That's ~11s of pure idle time on a 32vcpu run and ~22s on an 8vcpu run, wasted purely on steps Rspec doesn't need. This compounds across every CI run of every app using this shared workflow.What Changed
id:s toCompile Assets,Install Playwright Chromium Browser, andSetup Parallel Databasesso they can be referenced explicitlywait-all: truebeforeRun Rspec Testswith await:scoped to just Rspec's real dependencies:install-ruby,install-apt,install-yarn,compile-assets,install-playwright,setup-parallel-databaseswait: [save-asset-cache](right afterRun Rspec Tests) withwait-all: true, so those background lint/security/stats steps are still joined before the job's final parallel block — preserving the guarantee that a lint/security failure fails the job and thatsteps.project-stats.outputs.tableis populated before it's publishedTest plan
v3.x.yreleasebgea_volunteer_care) still fails correctly when Rubocop/Brakeman/Dependency Audit is brokenRun Rspec Testsnow starts as soon as its real dependencies are ready, not gated on Brakeman/RubocopScreenshots
N/A — no UI changes