Repository navigation
🤖 fix: show Coder's enabled flag for CoderMCPServer and keep observedGeneration with its conditions - #418
Merged
Conversation
…ation (#415) Change-Id: Ibc6a00cf62d6dbc2adbc679cc05b07406f6766f7 Signed-off-by: Thomas Kosiewski <tk@coder.com>
…neration with its conditions (#415) Change-Id: I58218dc17a79b7c8c097ee05a5d248f38104481b Signed-off-by: Thomas Kosiewski <tk@coder.com>
Change-Id: I2604c3c8fc215b0963bdfc2620fc2de0e70cca3c 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. |
Member
Author
|
@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. |
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.
Summary
Two
CoderMCPServerfixes that #408 made forCoderAIProvider.kubectl get codermcpserversnow prints the newstatus.enabledfield in theENABLEDcolumn, notspec.enabled. The field holds the enabled flag that Coder reported at the controller's last read or update. A refused object that Coder does not have, or one whose config was deleted in Coder, shows an empty cell instead oftrue.status.observedGenerationnow moves only together with the conditions of that generation. Before, the status write that stores the config ID after a create or record (before the sync PATCH) advanced it while the conditions still described the previous generation.Background
The goal is for every open coder-k8s issue to be fixed on
main. #415 holds the twoCoderMCPServergaps that #408 (for #321) left out of scope.The trigger for item 2: a create whose answer is lost (
ConfirmingCreateat generation 1), then a spec edit (generation 2), then a reconcile whose sync PATCH hangs until the context expires. The record write storedobservedGeneration=2next to conditions from generation 1. The current conditions in that trace areReconciling=True, so health showsProgressing. A record after a recreate can carry an oldReady=True, which the current health rules read asHealthy.Implementation
status.enabled(*bool), with the same doc text asCoderAIProvider. The controller sets it after each Coder answer that passes the ID, organization and slug checks: the sync GET and PATCH, the record, the create, the opt-in and consent disables, and the missing-group disable. Coder's own 404 clears it in the sync (DeletedExternally, and recreate together withconfigID) and in the disable read. The printer column reads.status.enabled. I regenerated the deepcopy, CRD,dist/install.yamlanddocs/reference/api/codermcpserver.md.applyMCPServerStepnow setsstatus.observedGeneration, the same way 🤖 fix: finish the CoderAIProvider activation follow-ups #408 changedapplyAIProviderStep.writeStatusno longer sets it.check(). It now leaves both fields at the old generation.Status.ObservedGeneration.config/gitops/*codermcpserver*now ignores conditions whoseobservedGenerationis notmetadata.generation. The new filter is the same as theCoderAIProviderrules. This covers statuses that an older controller wrote.docs/how-to/manage-mcp-servers.mdcopies both rules and describes the column.enabledColumn(coderaiprovider_column_test.go) now takes the resource name and aclient.Object, so both kinds use it.codermcpserver_delete.gois unchanged. While an object is being deleted,status.enabledkeeps its last value.Validation
Commit bcf9881 holds only the tests. On it, the tests fail:
Commit 8dd26af makes them pass. The hang test then checks that the next reconcile applies the edit (
Applied, and Coder holds the new display name).make verify-vendor,make build,make lint,make test,make test-integration: pass.make codegen manifests docs-reference build-installer: no diff after the commits.nix develop -c make docs-check(mkdocs strict),markdownlint-cli2andcspellon the changed docs: pass.writeStatusis the onlyCoderMCPServerstatus writer.Risks
status.enabledholds the value from the controller's last read. It can be stale while Coder is unreachable. Existing objects show an empty cell until their next reconcile reads Coder.enablednow causes one status write on the next resync. This is the intended column update.Fixes #415
Refs #155
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high