Skip to content

feat: template delete, orphaned namespaces, definition update-chart#50

Merged
omattsson merged 2 commits intomainfrom
feat/template-delete-orphaned-update-chart
Apr 22, 2026
Merged

feat: template delete, orphaned namespaces, definition update-chart#50
omattsson merged 2 commits intomainfrom
feat/template-delete-orphaned-update-chart

Conversation

@omattsson
Copy link
Copy Markdown
Owner

Summary

Adds CLI commands for three related issues:

Changes

File What
types.go Add OrphanedNamespace, UpdateChartConfigRequest, DefaultBranch on UpdateDefinitionRequest
client.go Add DeleteTemplate, ListOrphanedNamespaces, DeleteOrphanedNamespace, GetDefinitionChart, UpdateDefinitionChart
template.go Add templateDeleteCmd
orphaned.go New file — orphanedCmd, orphanedListCmd, orphanedDeleteCmd
definition.go Add --branch flag to update, add definitionUpdateChartCmd with merge logic

Design notes

  • update-chart fetches current chart config before updating so unspecified fields (chart_path, deploy_order, etc.) are preserved — addressing the root cause described in Add definition update and update-chart commands #46
  • Path traversal checks on --file happen before any API calls
  • --deploy-order uses sentinel default (-1) to distinguish "not set" from explicit 0

Test plan

  • Template delete: yes flag, confirmation, decline, not-found, quiet output
  • Orphaned list: table/JSON/quiet output, empty list, API error
  • Orphaned delete: yes flag, confirmation, decline, not-found, quiet output
  • Definition update --branch: branch-only update, no-flags error
  • Definition update-chart: chart-version, values-from-file, deploy-order, no-flags error, JSON/quiet output, path traversal
  • Full test suite green (go test ./...)

Closes #43, closes #44, closes #46

🤖 Generated with Claude Code

Olof Mattsson and others added 2 commits April 22, 2026 20:12
…-chart

- template delete: confirmation-prompted deletion via deleteByID pattern (#43)
- orphaned list/delete: manage namespaces with stack-manager label but
  no matching DB record (#44)
- definition update: add --branch flag for default_branch (#46)
- definition update-chart: GET-merge-PUT pattern to preserve unspecified
  fields; supports --chart-path, --chart-version, --deploy-order, --file (#46)

Closes #43, closes #44, closes #46

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add template delete, orphaned namespace list/delete sections
- Add definition update (--branch), update-chart examples
- Document name-based resolution in stack and bulk commands
- Add stack history/rollback/history-values examples
- Update project structure (orphaned.go, resolve.go)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@omattsson omattsson merged commit 4671cc2 into main Apr 22, 2026
6 checks passed
@omattsson omattsson deleted the feat/template-delete-orphaned-update-chart branch April 22, 2026 18:20
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.

Add definition update and update-chart commands Add orphaned namespace management commands feat: add template delete command to stackctl CLI

1 participant