Skip to content

Worker readiness follows scheduler registration - #2821

Merged
amankrx merged 5 commits into
TraceMachina:mainfrom
amankrx:pr/worker-readiness
Sep 29, 2026
Merged

amankrx merged 5 commits into
TraceMachina:mainfrom
amankrx:pr/worker-readiness

Conversation

@amankrx

@amankrx amankrx commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

What and why

A worker pod turned Ready when its container started, not when the worker could take work: /status answers 200 while a component is still initializing, which suits a liveness probe and misleads a readiness probe, and an autoscaler reading pod readiness counted idle time from container start. The health service now also serves /ready (readiness_path), which answers 503 while anything is initializing or failed. Each worker registers a workers/<name> indicator that reads Initializing until the scheduler answers its connect_worker, Ok while that connection holds, and Initializing again once it is lost and the worker is reconnecting, so only /ready drops and a liveness probe on /status stays green through a scheduler roll. A readiness probe on /ready turns the pod Ready at registration and not Ready again when it loses the scheduler. The two paths must differ; the same path for both is refused at startup with a message rather than left to panic the router.

How was this verified?

health_server_test.rs: the readiness form answers 503 for an initializing component where the plain form answers 200. local_worker_test.rs: the registration flag is off before the scheduler's ConnectionResult, on after it, and off again when the stream ends, reading Initializing rather than Failed. health_server_test.rs also covers the path defaults and the refusal of a shared path.

The docs snippet lint only knew the latest release's reference, so a snippet naming a new field could not pass until the next release; it now reads main's reference as well, regenerated here.

Risk

Low. /status is unchanged, and /ready is a new path; a probe has to be pointed at it to change anything. The chart's probe is off by default so older images keep working.

AI assistance

An agent drafted the change and I reviewed every line.

(cherry picked from commit f20ef84ec0a2a975a1ce59be881b653f0d4ef7a7)
@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nativelink Ready Ready Preview Sep 29, 2026 6:06pm UTC
nativelink-aidm Ready Ready Preview Sep 29, 2026 6:06pm UTC

Request Review

Comment thread nativelink-worker/src/local_worker.rs Outdated
Comment thread src/bin/nativelink.rs
corcillo
corcillo previously approved these changes Sep 29, 2026
@amankrx
amankrx merged commit de7a540 into TraceMachina:main Sep 29, 2026
36 checks passed

This branch was successfully deployed

2 active deployments
Preview – nativelink — 17d8dc49 Deployed Sep 29, 2026 by vercel[bot]
Preview – nativelink-aidm — 17d8dc49 Deployed Sep 29, 2026 by vercel[bot]
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.

2 participants