Skip to content

test(ci): boot bin/temporal_worker in the check suite - #255

Merged
artempartos merged 1 commit into
developfrom
ci/temporal-worker-boot-smoke
Sep 12, 2026
Merged

artempartos merged 1 commit into
developfrom
ci/temporal-worker-boot-smoke

Conversation

@artempartos

Copy link
Copy Markdown
Contributor

Why

Nothing in this repository ever loaded bin/temporal_worker. assets:precompile does not, the
test 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-ruby 7.0.0 removed enable_logs; the worker's own second
Sentry.init still set it:

bin/temporal_worker:22:in 'block in <main>': undefined method 'enable_logs=' for an instance of Sentry::Configuration (NoMethodError)
	from /usr/local/bundle/gems/sentry-ruby-7.0.0/lib/sentry-ruby.rb:266:in 'Sentry.init'

Every worker-ruby pod hit CrashLoopBackOff. Because the raise happened inside Sentry.init,
above the begin/rescue at the bottom of the file that reports fatal errors, Sentry never heard
about it. Nothing polled the Temporal task queue for nearly two hours, and every WorkflowRun
created in that window sat in pending — with the admission pool at occupied: 6 of limit: 20
and 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.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 is printed before the first
call that would need one. What it does not cover is everything past that line — schedule sync, the
connection, task polling.

Sentry.init only runs when a DSN is configured and the environment is not development, so the
check supplies both. Without that it would skip the very block that broke production.

Placement

Sequential in run_be_checks 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. Also available standalone as
make worker-boot.

🤖 Generated with Claude Code

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]>
@artempartos
artempartos merged commit 43fa652 into develop Sep 12, 2026
7 checks passed
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