Repository navigation
🤖 feat: GitOps health rules and troubleshooting for workspace pools (#153 PR 16a) - #453
Conversation
…derWorkspaceClaim (#153) Change-Id: Id132668b4604dcd75c7dbcff651c3f25512c0e0f Signed-off-by: Thomas Kosiewski <tk@coder.com>
…hooting (#153) Change-Id: I39a4bcca90489c23e5fcee27cc10bd611d5bdea1 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…h rules (#153) Change-Id: I770d1585d1de1c0ae371a3ab910ec1b4449e8ce7 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I3d0054da6ecf6f6a8ed3336751173f0ac5fdc539 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: Icfe185a6bdc6a77437b376f9512b9c47ed9c3652 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Dogfood for plan row 16: Desktop (1440 px): Mobile (390 px). The reason tables scroll sideways, like the other tables on the site: |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
…ber failure (#153) Change-Id: Ic1ebf2845d1fca904fb5933fdc834b12cda6a172 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I5bee8847ee7906bdc82f8157c35249be7cc4b5dd Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |






Summary
Argo CD and Flux now have health rules for
CoderWorkspacePoolandCoderWorkspaceClaim, and the troubleshooting page now explains every reason that the pool, member, and claim controllers can write, with its cause and fix. This is plan PR 16a of #153. Theworkspace-pools.mdrestructure follows in 16b, after 15b lands.Background
Without health rules, Argo CD has no health check for pools and claims, and Flux reports a new pool or claim as
Currentbefore the controller writes any status. So a sync wave that waits for a pool can go on too early. The pool and claim controllers also write more than 70 different reasons, but the docs explained only a few. Plan section 7.4 item 2 defines the rules, and plan row 16 asks for a troubleshooting section that covers every reason.Implementation
config/gitops/argocd-health-coderworkspace{pool,claim}.luaandflux-healthcheck-coderworkspace{pool,claim}.yamlfollow the existingCoderAIProviderfiles.HealthywhenReady=Trueandstatus.observedGenerationequalsmetadata.generation,DegradedwhenStalled=True, otherwiseProgressing. A/scalewrite raises the generation, so a resized pool isProgressinguntil the controller has counted its members again.HealthywhenReady=True,DegradedwhenStalled=Trueor the phase isLost, otherwiseProgressing. A claim has nostatus.observedGeneration, so the rules read only conditions whoseobservedGenerationmatches the generation.Deleting the workspace poolorDeleting the workspace claimwhile Argo CD deletes the object.config/gitops/health_test.goadds 30 fixtures for the two kinds (12 pool, 18 claim). They cover a missing status, stale generations, waits, stalls,Lost, the Share stalls (ClaimModeMismatch,ShareRefused,ShareRevoked), and deletion. The existing doc-copy test keeps the copies indocs/how-to/gitops.mdequal to the files.docs/how-to/gitops.mdgets a section with state tables, install steps, and copies of the rules.docs/how-to/troubleshooting.mdgets "Troubleshoot workspace pools". It has one table per object (a pool and a member before its create request, a pool, a member, and a claim), plus five common cases:ShareUserNotEligible(groups other thanEveryoneneed Premium, so Coder answers403without it),status.memberNamenames),kwp-workspace (OwnershipUnknown). The fix is to delete the workspace in Coder, then remove only the operator's finalizer.The tables link the open follow-ups CoderWorkspacePool: a dashboard page view marks an unclaimed member Used #444, 🤖 CoderWorkspacePool Share mode: shares stay while a control plane is being deleted #448, 🤖 CoderWorkspaceClaim Share mode: claim reasons reveal facts about named Coder users #449, and 🤖 CoderWorkspacePool Share mode: optionally stop the workspace when a share is revoked #450 where they apply.
Validation
Reason coverage. This script lists every CamelCase string literal in the pool, member, claim, and share code and in the shared Coder helpers they call (all of them are reasons, except the kind name
CoderWorkspacePool). It fails iftroubleshooting.mddoes not name one of them. It passes with 73 reasons:Mutation check of the rules. I broke each branch of the four rule files by hand: the
Lostcheck, theStalledbranch, the generation filters, the staleobservedGenerationcheck, the deletion message, and the FluxLostclauses. Each break makes at least one fixture fail. One edit fails no fixture: removing theReconcilingclause of the FluxinProgressexpression. That clause cannot change a result, because Flux falls back toInProgressanyway. The existingCoderAIProviderrule behaves the same way.An independent reviewer compared every doc claim with the code before I opened this PR. It found 9 wrong or overstated claims, and I fixed all of them. One example: a claimed member that fails is not replaced. Its claim stays
Boundand not ready until someone deletes the claim.Local gates:
make verify-vendor,make build,make lint,make test,nix develop -c make docs-check,go test ./config/gitops/...,markdownlint-cli2 "docs/**/*.md", andcspellwith the CI versions.Dogfood: I ran
make docs-serveand took agent-browser screenshots of the new sections at 390 px and 1440 px. They are in a comment below.Risks
Ready,Reconciling, andStalledtogether, with the object's generation in each condition'sobservedGeneration. A controller change that breaks that assumption must update these rules and fixtures too.Refs #153
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:xhigh