Skip to content

fix(action): per-stack action messages and the scope_incomplete hint - #176

Merged
omattsson merged 1 commit into
mainfrom
fix/actions-scope-message
Oct 27, 2026
Merged

omattsson merged 1 commit into
mainfrom
fix/actions-scope-message

Conversation

@omattsson

Copy link
Copy Markdown
Owner

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/actions then lists only the actions of that stack and can set scope_incomplete: true when 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). With scope_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 json and -o yaml carry the field.
  • stack action run: an unknown action gives unknown 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.
  • README: a paragraph on per-stack actions and a row in "Server version requirements".

Contract tests

cli/test/contract/testdata/swagger.json is refreshed from the k8s-stack-manager branch feat/720-hook-scope (refresh-swagger.sh feat/720-hook-scope), so handlers.actionListResponse has scope_incomplete. The refresh also brings the backend changes that reached its main since the last refresh (notification channel and logout descriptions, secret_unreadable). Refresh again from main after omattsson/k8s-stack-manager#721 merges if you want the vendored file to point at main.

Checks

  • go test ./... (cmd, integration, e2e, contract): passed
  • make lint (go vet, staticcheck): passed
  • New tests: stack action list with scope_incomplete (table and empty list), findAction messages 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

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>
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@omattsson
omattsson merged commit 0d7204c into main Oct 27, 2026
8 checks passed
@omattsson
omattsson deleted the fix/actions-scope-message branch October 27, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant