Repository navigation
fix(cli): show the deployment status the revision list returns - #4333
Merged
Merged
Conversation
occ agent revisions replaced each summary's deploymentStatus with a second per-revision deployment status read. That read decodes saved settings, so an Agent or revision with unreadable settings showed "-" (null in JSON) and a notice, though the API list already carried its status. It also cost one request per listed revision. Keep the listed status and error code.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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.
Problem
occ agent revisionsdid not show the deployment status that the revision list returns. Since #3598, each item ofGET /namespaces/:ns/agents/:id/revisionscarriesdeploymentStatusanddeploymentErrorCode. The list reads them without decoding saved settings. The CLI still set every row'sdeploymentStatusto null, then read/deployments/:idagain for each revision. That strict read decodes saved settings, so:-(JSON/YAMLnull) for every revision, plus a notice that status is unavailable;-and a notice for its503;The API and the console showed the real status, for example
queued, in these cases. The PostgreSQL browsing test pinned the CLI'snull.Change
describeAgentRevisionskeeps each summary as OCC sent it and only adds theactivemarker. It makes no read for each revision and prints no "unavailable" notices.503on each deployment status read in table, JSON and YAML output. It checks that no/deployments/request is sent.tests/integration/postgres-platform-state.test.mjsnow checks that CLI JSON statuses match the API list, and that no notice is printed.docs/flows/cli-agent-browsing.mddescribes the new flow.Verification
go test ./internal/occcli -run TestAgentRevisions: 3 tests fail on main (STATUS-, JSONnull, unavailable notice). All pass with the change. The wholeinternal/occcliandcmd/occpackages pass.postgres-platformCI lane,pnpm run typecheck, and a 20/20 pin of the Go package at 2 CPUs : all passed (postgres-platform-state.test.mjs included); pin 20/20.Risks
Low. The change is CLI presentation only. Table columns and JSON keys stay the same. A revision without a deployment work record still shows
null, as the API lists it.