ci(deploy): report the deploy that happened, not the cluster's worst pod (#835) - #839
Merged
Merged
Conversation
…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.
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.
Closes #835.
Every
Deploy Devrun on 2026-08-04 reported failure while deploying successfully — five consecutively, helm revisions 420–424 all recordedfailed.What was actually wrong
--waitwaits for every resource in the release. Two workloads in the chart have been unready for days:litellmCrashLoopBackOff, 561 restarts over 2d10hcloud-codex-codyInit:CrashLoopBackOffNeither will ever become ready, so
--waitburned its full 10m timeout and exited non-zero — whilebackend,frontend,clawdbot-gatewayandcommonly-bothad all rolled out correctly minutes earlier. Verified live: those four passkubectl rollout statusimmediately; the other two never do.The error is misleading, and I fell for it first. It surfaces as:
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
deployedwent stale by days. A barehelm rollback commonly-devduring 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 statusstill 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, becauseclawdbot-gatewaycarries 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.enabledandagents.cloudCodex.enabledtofalseinvalues-dev.yaml. Both areenabled: truewhile 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:
cloud-codex-cody litellmWorkflow YAML re-parsed after editing; step order and the removal of
--waitasserted programmatically.