Skip to content

ci(deploy): report the deploy that happened, not the cluster's worst pod (#835) - #839

Merged
lilyshen0722 merged 1 commit into
mainfrom
fix/835-deploy-reports-truthfully
Aug 5, 2026
Merged

ci(deploy): report the deploy that happened, not the cluster's worst pod (#835)#839
lilyshen0722 merged 1 commit into
mainfrom
fix/835-deploy-reports-truthfully

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Closes #835.

Every Deploy Dev run on 2026-08-04 reported failure while deploying successfully — five consecutively, helm revisions 420–424 all recorded failed.

What was actually wrong

--wait waits for every resource in the release. Two workloads in the chart have been unready for days:

workload state
litellm CrashLoopBackOff, 561 restarts over 2d10h
cloud-codex-cody Init:CrashLoopBackOff

Neither will ever become ready, so --wait burned its full 10m timeout and exited non-zero — while backend, frontend, clawdbot-gateway and commonly-bot had all rolled out correctly minutes earlier. Verified live: those four pass kubectl rollout status immediately; the other two never do.

The error is misleading, and I fell for it first. It surfaces as:

client rate limiter Wait returned an error: context deadline exceeded

That reads like throttling. It isn't — the release already runs --burst-limit 200 --qps 100 (#245, added long ago). It is the context deadline expiring while waiting on pods that cannot converge. Raising the limiter, which is the obvious fix and the first one I proposed on the issue, could never have worked. Worth recording because the next person will read that string the same way.

Why it mattered more than a red check

helm records a failed upgrade, so the newest revision helm considers deployed went stale by days. A bare helm rollback commonly-dev during an incident would have silently reverted every deploy since Aug 2 — including both auth fixes (#817/#821) and the heartbeat opt-in (#833). Rollback safety depends on this job telling the truth.

The secondary cost is desensitisation: five false failures in one day is enough to make a real one invisible.

The change

Drop --wait; verify exactly the four workloads whose image tags this job sets.

Scoping is the whole point. An unrelated unhealthy workload is a real problem, but it is not this job's failure, and conflating the two is what made the signal worthless. kubectl rollout status still returns non-zero on a genuinely stuck rollout, so a real regression fails as loudly as before — it just no longer fails on things the job never touched. Per-deployment timeouts, because clawdbot-gateway carries two init containers and legitimately takes minutes longer than the rest.

Unhealthy workloads outside the deployed set are surfaced as a ::notice:: rather than failed on. Silence is how litellm reached 561 restarts unnoticed; failing on it is how five good deploys got marked bad. A notice is the correct middle.

Deliberately not included

Setting litellm.enabled and agents.cloudCodex.enabled to false in values-dev.yaml. Both are enabled: true while dead, and turning them off would also fix this — but that is a decision about the native runtime and the cloud-agent tier, not a CI fix. It needs an owner's call, and it would be doing it for the wrong reason (to make CI green) rather than the right one (nobody wants them running). Flagged separately.

Verification

Both halves exercised against the live cluster before committing:

  • the unhealthy-workload query returns exactly cloud-codex-cody litellm
  • the four-deployment gate passes on all four, so the job would now correctly report success for the very deploy that reported failure

Workflow YAML re-parsed after editing; step order and the removal of --wait asserted programmatically.

…pod (#835)

Every `Deploy Dev` run on 2026-08-04 reported failure while deploying
successfully — five consecutively, helm revisions 420-424 all recorded
`failed`.

Cause: `--wait` waits for EVERY resource in the release. Two workloads in the
chart have been unready for days — `litellm` (CrashLoopBackOff, 561 restarts
over 2d10h) and `cloud-codex-cody` (Init:CrashLoopBackOff) — so the wait
burned its full 10m timeout and exited non-zero while backend, frontend,
clawdbot-gateway and commonly-bot had all rolled out correctly minutes
earlier. Verified live: those four pass `kubectl rollout status` immediately;
the other two never will.

The error it surfaces reads like throttling and is not:

  client rate limiter Wait returned an error: context deadline exceeded

The release already runs `--burst-limit 200 --qps 100` (#245). That is the
context deadline expiring while waiting on pods that cannot become ready, so
raising the limiter — the obvious fix, and the first one I proposed on the
issue — could never have worked.

The damage was not the red check. helm records a failed upgrade, so the newest
revision helm considers `deployed` went stale by days: a bare
`helm rollback commonly-dev` during an incident would have silently reverted
every deploy since Aug 2, including two auth fixes and the heartbeat opt-in.
Rollback safety depends on this job telling the truth.

So: drop `--wait`, and verify exactly the four workloads whose image tags this
job sets. Scoping is the point — an unrelated unhealthy workload is a real
problem but it is not THIS job's failure, and conflating them is what made the
signal worthless. `kubectl rollout status` still returns non-zero on a genuine
stuck rollout, so a real regression fails as loudly as before. Per-deployment
timeouts, because clawdbot-gateway carries two init containers and takes
minutes longer than the rest.

Workloads outside the deployed set are surfaced as a notice rather than
failed on. Silence is how litellm reached 561 restarts unnoticed; failing on
it is how five good deploys got marked bad. A notice is the correct middle.

Deliberately NOT included: disabling litellm and cloudCodex in values-dev.
Both are `enabled: true` while dead, and turning them off would fix this too
— but that is a decision about the native runtime and cloud agents, not a CI
fix, and it belongs to whoever owns that call.

Verified against the live cluster: the unhealthy-workload query returns
exactly `cloud-codex-cody litellm`, and the four-deployment gate passes.
@lilyshen0722
lilyshen0722 merged commit 7ca0947 into main Aug 5, 2026
11 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.

Deploy Dev reports failure on every successful deploy — and it has made helm rollback dangerous

1 participant