Repository navigation
test(ci): boot bin/temporal_worker in the check suite - #255
Merged
Merged
Conversation
Nothing in the repository ever loaded bin/temporal_worker. `assets:precompile` does not, the suite does not, and rubocop only parses it. A runtime error in that file therefore reached production as a green build — on 2026-09-12 it did, and because the raise happened inside `Sentry.init` itself, above the begin/rescue that reports fatal errors, Sentry never heard about it either. Every worker-ruby pod crashlooped, nothing polled the Temporal task queue for nearly two hours, and every WorkflowRun created in that window sat in `pending`. The check boots the worker and waits for it to announce its registry, which proves Rails booted, `Sentry.init` ran against the real gem, and every workflow and activity class loaded and could be instantiated. It needs no Temporal server: TEMPORAL_ENABLED=false, and the marker line is printed before the first call that would need one. Sentry.init only runs with a DSN configured outside development, so the check supplies both — otherwise it would skip the very block that broke production. Sequential rather than part of the parallel batch: it boots Rails against the test database and the tools registry reconciles on boot, so racing it against the suite writing the same database buys a few seconds and a class of flake. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
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
Nothing in this repository ever loaded
bin/temporal_worker.assets:precompiledoes not, thetest suite does not, and rubocop only parses it. So a runtime error in that file reaches
production as a green build.
On 2026-09-12 one did.
sentry-ruby7.0.0 removedenable_logs; the worker's own secondSentry.initstill set it:Every
worker-rubypod hit CrashLoopBackOff. Because the raise happened insideSentry.init,above the
begin/rescueat the bottom of the file that reports fatal errors, Sentry never heardabout it. Nothing polled the Temporal task queue for nearly two hours, and every
WorkflowRuncreated in that window sat in
pending— with the admission pool atoccupied: 6oflimit: 20and
queued: 0, so on screen it read as a concurrency limit that was in fact nowhere near full.Fixed in #253. This is the check that would have caught it before the merge.
What it proves
The worker reaches
Ruby worker - registered activities— so Rails booted,Sentry.initranagainst the real gem, and every workflow and activity class loaded and could be instantiated.
It needs no Temporal server:
TEMPORAL_ENABLED=false, and the marker is printed before the firstcall that would need one. What it does not cover is everything past that line — schedule sync, the
connection, task polling.
Sentry.initonly runs when a DSN is configured and the environment is not development, so thecheck supplies both. Without that it would skip the very block that broke production.
Placement
Sequential in
run_be_checksrather than part of the parallel batch: it boots Rails against thetest database and the tools registry reconciles on boot, so racing it against the suite writing
the same database buys a few seconds and a class of flake. Also available standalone as
make worker-boot.🤖 Generated with Claude Code