Repository navigation
fix(action): per-stack action messages and the scope_incomplete hint - #176
Merged
Merged
Conversation
k8s-stack-manager can limit actions to some stacks (applies_to, omattsson/k8s-stack-manager#720), so the action list is per stack. - stack action list: "This stack has no custom actions." instead of "The server has no custom actions."; a note when the server sets scope_incomplete (actions it could not check are not shown). - stack action run: "unknown action ... (actions of this stack: ...)", with the same hint when the list is incomplete. - types.ActionList: scope_incomplete (omitted when false). - Vendored swagger refreshed from the k8s-stack-manager PR branch. - README: per-stack actions and the server version row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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
k8s-stack-manager can limit custom actions to some stacks with
applies_to(omattsson/k8s-stack-manager#720, PR omattsson/k8s-stack-manager#721).GET /stack-instances/:id/actionsthen lists only the actions of that stack and can setscope_incomplete: truewhen it could not check some actions. stackctl keeps working without this PR, but two messages become misleading and the hint is lost.stack action list: an empty list prints "This stack has no custom actions." instead of "The server has no custom actions." (the server may have actions for other stacks). Withscope_incomplete, the table (or the empty message) ends with "Some actions are not shown: the server could not check where they apply. Try again."-o jsonand-o yamlcarry the field.stack action run: an unknown action givesunknown action "x" (actions of this stack: ...), and adds "some actions could not be checked for this stack, try again" when the list is incomplete. stackctl still sends no request for an action that is not in the list.types.ActionList:ScopeIncomplete(scope_incomplete, omitted when false). Older servers do not send it.Contract tests
cli/test/contract/testdata/swagger.jsonis refreshed from the k8s-stack-manager branchfeat/720-hook-scope(refresh-swagger.sh feat/720-hook-scope), sohandlers.actionListResponsehasscope_incomplete. The refresh also brings the backend changes that reached itsmainsince the last refresh (notification channel and logout descriptions,secret_unreadable). Refresh again frommainafter omattsson/k8s-stack-manager#721 merges if you want the vendored file to point atmain.Checks
go test ./...(cmd, integration, e2e, contract): passedmake lint(go vet,staticcheck): passedstack action listwithscope_incomplete(table and empty list),findActionmessages with and without the hint; the existing "unknown action" and "no actions" cases use the new wording.Merge order
Merge after omattsson/k8s-stack-manager#721.
🤖 Generated with Claude Code