← Back to Pull requests

fix(helm): the router Deployment's progress deadline covers the engine's bring-up now that /readiness follows the engine #4286

Merged
hello-alexmcc merged 5 files (52 lines) on Oct 23, 2026 21:59 UTC
View on GitHub
hello-alexmcc hello-alexmcc commented on Oct 23, 2026 01:56 UTC
Author

Owed

A follow-up right after this merges: the worker Deployment's default margin over its startup probe's budget grows from 120 s to 600 s (the rollout's clock also counts the node's provisioning, the image pull and the container start, which a 120 s margin covers only on a warm node), and the README's Startup Probes paragraph names the per-worker progressDeadlineSeconds for autoscaled pools and cold image caches.

Release note

The Helm chart's router Deployment gets a rollout progress deadline (router.progressDeadlineSeconds, 1920 s by default: the gateway's own worker start-up bound of 1800 s plus the chart's tail after it and a margin for the image pull) instead of the Kubernetes default, 600 s: /readiness answers 503 until a worker's engine reports healthy, tens of minutes for a large checkpoint, and a router waiting for its engine is no longer reported as a failed rollout. The chart README names every deadline that must cover the engine's bring-up (the progress deadline, helm --wait --timeout, a serving controller's router deadline, --worker-startup-timeout-secs) and why none of them is a startup probe on the router. A worker Deployment's progress deadline follows its startup probe's budget (initialDelaySeconds + failureThreshold * periodSeconds plus 120 s, never below 600 s; progressDeadlineSeconds on the worker entry overrides it), so a worker still loading within the budget the chart already sizes is not reported as a failed rollout either.

Numbers

| metric | before | after | setup |
| --- | --- | --- | --- |
| router Deployment progressDeadlineSeconds in the rendered chart | field absent: the Kubernetes default, 600 s | 1920 s by default; --set router.progressDeadlineSeconds=3600 renders 3600 | helm template smg deploy/helm/smg --set 'router.workerUrls={grpc://engine:50051}'; the mesh example renders the router as a StatefulSet, which has no such field, before and after |
| worker Deployment progressDeadlineSeconds in the rendered chart | field absent: 600 s, whatever the startup probe's budget | 600 s with the default probe (60 + 30 x 10 s = 360 s of budget); 900 s for a probe of 180 + 60 x 10 s; a worker entry's progressDeadlineSeconds: 1234 renders 1234 | helm template with the with-vllm-http and with-mesh-ha examples and with a values file of three workers (the long probe, the override, a 40 s probe that keeps the 600 s floor) |
| helm lint, examples rendered | 1 chart, 0 failed; 10 of 10 | 1 chart, 0 failed; 10 of 10 | helm lint deploy/helm/smg; helm template with each file under deploy/helm/smg/examples/ |
| /readiness first 200 from the gateway's launch, gateway defaults, the engine not healthy until +70 s | +92 s: 22 s after the engine (the 30 s start-up poll found it at +90 s, the tokenizer registered 2 s later) | same: the gateway is unchanged, the deadline is sized to this | CPU, dev build: one gRPC mock engine (crate mock-worker) held not-serving through its admin API, --worker-urls grpc://127.0.0.1:<port> --policy random; a prober reads /liveness, /health, /readiness once a second for 150 s |
| /liveness and /health first 200 from the gateway's launch | +1 s (+0 s: listener not yet bound) | same | same cell; a liveness deadline never fires, only a readiness deadline can |
| /readiness first 200, --worker-startup-check-interval 1 | +72 s: 2 s after the engine | same | same cell with the one flag, 120 s |
| /readiness when the engine turns healthy after --worker-startup-timeout-secs (20 s, poll 2 s, engine healthy at +45 s) | 503 for all 130 s: nine polls to +17 s, the registration gave up at +19 s, the worker never registered | same: the README names this bound as part of the budget (router.extraArgs) | same cell, 130 s |
| a router whose engine needs 37 min under a 30 min readiness deadline on the router | the deadline fired: the serving controller declared the router failed, relocated it with a node anti-affinity that could not schedule under a single-node pin, and the service had no endpoint although the router became healthy at 37 min | the same service came up and served once the router had the engine's 4 h budget; the chart's Deployment deadline now covers a 30 min engine and the README names the rule for every other deadline | live bring-up of a two-node tensor-parallel engine behind one router, two placements |

Diff: 52 lines (+50 / -2) across 5 files Reviewer: hello-alexmcc Review duration: 1202m
All Vouch review confidence checks passed
Residual risk 0.12 = Change Risk (0.70) × (1 − Review Confidence (0.82)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.70 · 52 lines diff across 5 files
0.70
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.87 · 5 substantive comment(s)
0.87
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
82%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.238
Self Review self_review
0.140
Sensitive Paths sensitive_paths
0.070
Real PR Conversation Timeline
13 items
coderabbitai[bot] coderabbitai[bot] commented on Oct 23, 2026 01:56 UTC
Bot

<!-- coderabbit-ai-generated:v1 -->

<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: rate limited by coderabbit.ai -->

[!WARNING]

## Review limit reached

> Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

> Next included review available in 3 minutes.

> Check out review usage here.

> <details>

<summary><strong>View limit details</strong></summary>

<dl>

<dd>

> Limit details: You’ve used all 4 included reviews currently available.

> Learn how review limits work.

> Review configuration:

> <details>

<summary><strong>⚙️ Run configuration</strong></summary>

<dl>

<dd>

> - Source mode: Auto

- Repository: Unavailable

- Branch: Unavailable

- File: No configuration file from this repository applied

- Commit: Unavailable

- Layers: Organization UI

- Review profile: CHILL

- Plan: Team

- Run ID: 6adc068d-53a6-428c-bf89-b00e155cb768

> </dd>

</dl>

</details>

> <details>

<summary><strong>📥 Commits</strong></summary>

<dl>

<dd>

> Reviewing files that changed from the base of the PR and between 0474fbdeb4274d57be30351a718934e073f9bc46 and ae0639959ee48197c363576aa5a61d3df65aa1ec.

> </dd>

</dl>

</details>

> <details>

<summary><strong>📒 Files selected for processing: 5</strong></summary>

<dl>

<dd>

> deploy/helm/smg/README.md

deploy/helm/smg/templates/deployment-router.yaml

deploy/helm/smg/templates/deployment-worker.yaml

deploy/helm/smg/values.schema.json

* deploy/helm/smg/values.yaml

> </dd>

</dl>

</details>

> </dd>

</dl>

</details>

<!-- end of auto-generated comment: rate limited by coderabbit.ai -->

<!-- autopilot:start -->

  • <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

  • <!-- autopilot:end -->
    <!-- tips_start -->

    <sub>Comment @coderabbitai help to get the list of available commands.</sub>

    <!-- tips_end -->

    claude[bot] claude[bot] commented on Oct 23, 2026 01:57 UTC
    Bot

    <!-- claude-pr-template-check -->
    👋 The PR description doesn't fully follow
    PULL_REQUEST_TEMPLATE.md:

  • Missing header: ## Description

  • Missing header: ### Problem

  • Missing header: ### Solution

  • Missing header: ## Changes

  • Missing header: ## Test Plan
  • Please update the PR description so reviewers have the context they need.

    claude[bot] claude[bot] commented on code on Oct 23, 2026 01:58 UTC
    Code Review
    deploy/helm/smg/templates/deployment-router.yaml:1
    @@ -16,6 +16,14 @@ spec:
       {{- if .Values.router.mesh.enabled }}
       serviceName: {{ include "smg.fullname" . }}-router-headless
       podManagementPolicy: Parallel
    +  {{- else }}
    +  {{- /* /readiness follows the engine: it answers 503 until a worker's engine
    +       reports healthy, tens of minutes for a large checkpoint. The rollout's
    +       progress deadline covers the gateway's own start-up bound
    +       (--worker-startup-timeout-secs, 1800 s by default) instead of the
    +       Kubernetes default of 600 s, so a router waiting for its engine is not
    +       reported as a failed rollout (README, Readiness Deadlines). */}}
    +  progressDeadlineSeconds: 1800

    🟡 Nit: progressDeadlineSeconds is hardcoded at 1800 and has no values knob. The README (README.md:180) tells users who raise --worker-startup-timeout-secs through router.extraArgs to raise "the rollout deadline with it". With this template they can't do that without a post-renderer or a fork of the chart. For example, someone who sets --worker-startup-timeout-secs 14400 for the 37-minute gang in the PR description still gets ProgressDeadlineExceeded at 30 min.

    Also, 1800 equals the gateway's bound exactly, with no margin. The Deployment's progress clock starts at pod creation, so it also counts image pull, container start, the final poll (up to 30 s), tokenizer registration and the readiness probe's 10 s period. An engine that turns healthy near the end of the gateway's window can make the pod Ready after the deadline has already passed.

    Suggestion: add router.progressDeadlineSeconds to values.yaml, defaulting to 1800 plus a margin (for example 1920), and render it here:

      progressDeadlineSeconds: {{ .Values.router.progressDeadlineSeconds }}
    

    Then point the README bullet at that value.

    claude[bot] claude[bot] commented on code on Oct 23, 2026 01:58 UTC
    Code Review
    deploy/helm/smg/README.md:1
    @@ -185,6 +198,8 @@ workers:
           failureThreshold: 60
     ```
     
    +Size the budget past the longest load you expect: a startup probe that fails for its whole budget restarts the worker, and the load starts over.

    🟡 Nit: This section now says loads take "tens of minutes" and tells users to size the startup probe past the longest load. But the chart's worker Deployments (templates/deployment-worker.yaml) still use the Kubernetes default progressDeadlineSeconds of 600. If a user follows this advice and the worker takes more than 10 minutes to become Ready, kubectl rollout status, Argo CD and Flux report the worker Deployment as failed, which is the same false failure this PR fixes for the router. helm --wait waits on that Deployment too.

    Either set a progress deadline on the worker Deployment as well (ideally derived from the startup probe budget, or exposed per worker), or add a line here that the worker Deployment's progress deadline also has to cover the load.

    claude[bot] claude[bot] approved these changes on Oct 23, 2026 01:58 UTC
    Approved Reviewer

    Small Helm-only change that is correct as written. The defaults it cites match the gateway CLI (--worker-startup-timeout-secs 1800, --worker-startup-check-interval 30). The 'discovered workers retry on a later pass' claim matches service_discovery/reconciler.rs. The Deployment-only guard keeps the StatefulSet (mesh) render valid. Two 🟡 nits inline: the router progress deadline has no values knob, and worker Deployments keep the 600 s default.

    hello-alexmcc hello-alexmcc commented on code on Oct 23, 2026 02:08 UTC
    Code Review
    deploy/helm/smg/templates/deployment-router.yaml:1
    @@ -16,6 +16,14 @@ spec:
       {{- if .Values.router.mesh.enabled }}
       serviceName: {{ include "smg.fullname" . }}-router-headless
       podManagementPolicy: Parallel
    +  {{- else }}
    +  {{- /* /readiness follows the engine: it answers 503 until a worker's engine
    +       reports healthy, tens of minutes for a large checkpoint. The rollout's
    +       progress deadline covers the gateway's own start-up bound
    +       (--worker-startup-timeout-secs, 1800 s by default) instead of the
    +       Kubernetes default of 600 s, so a router waiting for its engine is not
    +       reported as a failed rollout (README, Readiness Deadlines). */}}
    +  progressDeadlineSeconds: 1800

    Taken, both points. The next push adds router.progressDeadlineSeconds to values.yaml (and the schema), rendered here, with a default of 1920: the gateway's own bound (1800 s, --worker-startup-timeout-secs) plus the chart's own tail after it (one start-up poll of 30 s, the readiness probe's 10 s period, the registration) and a margin for the image pull and container start, which run on the rollout's clock before the gateway's. The README bullet then names the value next to --worker-startup-timeout-secs instead of "the rollout deadline".

    hello-alexmcc hello-alexmcc commented on code on Oct 23, 2026 02:08 UTC
    Code Review
    deploy/helm/smg/README.md:1
    @@ -185,6 +198,8 @@ workers:
           failureThreshold: 60
     ```
     
    +Size the budget past the longest load you expect: a startup probe that fails for its whole budget restarts the worker, and the load starts over.

    Right, the same false failure on the worker side. The next push gives the worker Deployment a progress deadline that follows its startup probe's budget: initialDelaySeconds + failureThreshold * periodSeconds + 120, never below the Kubernetes default of 600 (the default probe, 60 + 30 x 10 = 360 s, keeps 600; a probe sized for a half-hour load raises it with it), with a per-worker progressDeadlineSeconds override; the Startup Probes paragraph says so.

    hello-alexmcc hello-alexmcc commented on code on Oct 23, 2026 21:24 UTC
    Code Review
    deploy/helm/smg/templates/deployment-router.yaml:1
    @@ -16,6 +16,14 @@ spec:
       {{- if .Values.router.mesh.enabled }}
       serviceName: {{ include "smg.fullname" . }}-router-headless
       podManagementPolicy: Parallel
    +  {{- else }}
    +  {{- /* /readiness follows the engine: it answers 503 until a worker's engine
    +       reports healthy, tens of minutes for a large checkpoint. The rollout's
    +       progress deadline covers the gateway's own start-up bound
    +       (--worker-startup-timeout-secs, 1800 s by default) instead of the
    +       Kubernetes default of 600 s, so a router waiting for its engine is not
    +       reported as a failed rollout (README, Readiness Deadlines). */}}
    +  progressDeadlineSeconds: 1800

    Pushed: router.progressDeadlineSeconds is a values knob (default 1920, rendered on the router Deployment, in the schema), the worker Deployment's deadline follows its startup probe's budget, and the README names both; the branch is rebased onto the current main (its README gained the dashboard and alerts section next to this one).

    hello-alexmcc hello-alexmcc commented on code on Oct 23, 2026 21:24 UTC
    Code Review
    deploy/helm/smg/README.md:1
    @@ -185,6 +198,8 @@ workers:
           failureThreshold: 60
     ```
     
    +Size the budget past the longest load you expect: a startup probe that fails for its whole budget restarts the worker, and the load starts over.

    Pushed with the knob: the worker Deployment's progress deadline is its startup probe's budget (initialDelaySeconds + failureThreshold x periodSeconds + 120, a 600 floor, a per-worker override), rendered and checked by the chart's examples; the README's Readiness Deadlines section states the rule.

    claude[bot] claude[bot] commented on code on Oct 23, 2026 21:27 UTC
    Code Review
    deploy/helm/smg/templates/deployment-worker.yaml:1
    @@ -24,6 +24,15 @@ metadata:
         smg.lightseek.org/worker: {{ $worker.name }}
     spec:
       replicas: {{ $worker.replicas | default 1 }}
    +  {{- /* The rollout's progress deadline follows the startup probe's budget
    +       (initialDelaySeconds + failureThreshold x periodSeconds, the longest a
    +       load may take before the probe restarts the container) plus a margin for
    +       the image pull and container start, never below the Kubernetes default
    +       of 600 s: a worker sized for a long load is not reported as a failed
    +       rollout while it loads (README, Startup Probes). */}}
    +  {{- $probe := $worker.startupProbe | default (dict) }}
    +  {{- $budget := add ($probe.initialDelaySeconds | default 60) (mul ($probe.failureThreshold | default 30) ($probe.periodSeconds | default 10)) }}
    +  progressDeadlineSeconds: {{ $worker.progressDeadlineSeconds | default (max 600 (add $budget 120)) }}

    🟡 Nit: The 120 s added on top of the probe budget is the only slack for everything that runs on the rollout's clock before the startup probe's clock starts. For a GPU worker, 120 s is often not enough. The progress timer starts when the new ReplicaSet scales up. It then also counts:

  • the pod sitting Pending while a cluster autoscaler or Karpenter brings up a GPU node, often several minutes;

  • pulling a multi-GB engine image on a cold node (vllm/vllm-openai and the SGLang images are around 10 GB);

  • container start.
  • The probe's own timer starts only after all of that.

    Example: the README's own sized probe (initialDelaySeconds: 180, failureThreshold: 60) renders 900. If that worker lands on a freshly provisioned node with a 4-minute pull and loads in 11 minutes, which is inside its 780 s budget, it becomes Ready at about 15 minutes. By then the rollout was already marked ProgressDeadlineExceeded at 15:00 minus the pull overrun. Argo CD, Flux and kubectl rollout status then report it as failed. That is the false failure this PR is meant to remove. The 600 s floor hides this for the default probe, but not for any probe sized for a long load.

    Suggestion: use a larger default margin, for example add $budget 600. It costs nothing when the rollout is healthy, because the deadline only affects reporting. Alternatively, keep 120 s and add a sentence in the README's Startup Probes paragraph: on autoscaled GPU node pools or with cold image caches, raise progressDeadlineSeconds on the worker entry.

    hello-alexmcc hello-alexmcc commented on code on Oct 23, 2026 21:47 UTC
    Code Review
    deploy/helm/smg/templates/deployment-worker.yaml:1
    @@ -24,6 +24,15 @@ metadata:
         smg.lightseek.org/worker: {{ $worker.name }}
     spec:
       replicas: {{ $worker.replicas | default 1 }}
    +  {{- /* The rollout's progress deadline follows the startup probe's budget
    +       (initialDelaySeconds + failureThreshold x periodSeconds, the longest a
    +       load may take before the probe restarts the container) plus a margin for
    +       the image pull and container start, never below the Kubernetes default
    +       of 600 s: a worker sized for a long load is not reported as a failed
    +       rollout while it loads (README, Startup Probes). */}}
    +  {{- $probe := $worker.startupProbe | default (dict) }}
    +  {{- $budget := add ($probe.initialDelaySeconds | default 60) (mul ($probe.failureThreshold | default 30) ($probe.periodSeconds | default 10)) }}
    +  progressDeadlineSeconds: {{ $worker.progressDeadlineSeconds | default (max 600 (add $budget 120)) }}

    Agreed on the arithmetic: the rollout's clock runs through the node's provisioning, the pull and the container start before the probe's does, and 120 s covers only the warm case. The per-worker progressDeadlineSeconds is the override for autoscaled pools and cold caches today, but the default should not need it for a sized probe. This pull request is in the merge queue, so the change goes as a follow-up right after it: the worker margin becomes 600 s over the probe's budget (add $budget 600, the 600 floor kept) and the README's Startup Probes paragraph names the knob for autoscaled pools and cold image caches. Noted in the description under Owed.

    hello-alexmcc hello-alexmcc commented on Oct 23, 2026 22:06 UTC
    Author

    Follow-up for the review note on the worker Deployment's margin: https://github.com/smg-project/smg/pull/4364 raises it to 600 s over the startup probe's budget and names the per-worker override in the README.

    Reviewers
    Assignees
    hello-alexmcc hello-alexmcc
    Labels
    risk: low confidence: 82.1% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 69.8% (HIGH) · Higher = larger blast radius
    69.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 82.1% · Lower = rushed or shallow review
    82.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 12.5% · Safe to merge
    12.5%