Skip to content

feat: add stack history, rollback, and history-values commands#37

Merged
omattsson merged 2 commits intomainfrom
feat/deployment-history-rollback
Apr 20, 2026
Merged

feat: add stack history, rollback, and history-values commands#37
omattsson merged 2 commits intomainfrom
feat/deployment-history-rollback

Conversation

@omattsson
Copy link
Copy Markdown
Owner

Summary

  • Adds stack history command with pagination support for deployment history
  • Adds stack rollback command with --yes confirmation skip and --target-log targeting
  • Adds stack history-values command to view values from a past deployment
  • Updates DeploymentLog type (removes Base embed, adds explicit fields including ValuesSnapshot and TargetLogID)
  • Adds GetDeploymentHistory(), RollbackStack(), and GetDeployLogValues() client SDK methods

Companion to omattsson/k8s-stack-manager#114.

Test plan

  • All CLI tests pass (go test ./...)
  • Test stack history <id> returns paginated deployment logs
  • Test stack rollback <id> with and without --yes flag
  • Test stack history-values <id> <log-id> returns values snapshot
  • Verify JSON/YAML/table output formats for all new commands

🤖 Generated with Claude Code

Add CLI commands for deployment history (with pagination), one-click
rollback, and viewing historical deploy values. Updates DeploymentLog
type to include values snapshot and target log fields, and adds
corresponding client SDK methods.

Companion to k8s-stack-manager#114.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@omattsson
Copy link
Copy Markdown
Owner Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

- Add --quiet support to stackHistoryValuesCmd (prints log ID only)
- Replace anonymous struct in RollbackStack with named RollbackResponse type
- Fix GetStackLogs to decode DeploymentLogResult (matches backend pagination)
- Change DeployLogValuesResponse.Values from interface{} to map[string]interface{}
- Add 6 client tests, 8 command tests, and integration test for rollback flow
- Update existing test mocks to return DeploymentLogResult wrapper

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@omattsson omattsson merged commit 63f79f5 into main Apr 20, 2026
6 checks passed
@omattsson omattsson deleted the feat/deployment-history-rollback branch April 20, 2026 08:30
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