Skip to content

feat(vks): add --dry-run to remaining mutating commands#25

Merged
vks-team merged 1 commit into
mainfrom
feat/dry-run-vks-mutating
Jul 2, 2026
Merged

feat(vks): add --dry-run to remaining mutating commands#25
vks-team merged 1 commit into
mainfrom
feat/dry-run-vks-mutating

Conversation

@vks-team

@vks-team vks-team commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

After v1.4.0 covered destructive commands, five mutating (non-destructive) VKS commands still lacked --dry-run. This adds it to all of them, so every mutating VKS command now supports --dry-run.

Commands gaining --dry-run:

  • config-auto-healing
  • config-auto-upgrade
  • update-nodegroup-metadata
  • upgrade-nodegroup-version
  • generate-kubeconfig

Behavior

For these config/update-style commands, --dry-run previews the request payload and exits before createClient — so it needs no credentials or network. A shared helper cli.PrintDryRun(verb, target, body) keeps the output consistent (sorted keys + the standard Run without --dry-run to <verb>. footer):

$ grn vks upgrade-nodegroup-version --cluster-id k8s-x --nodegroup-id ng-x --k8s-version v1.29 --dry-run
=== DRY RUN ===
Would upgrade node group ng-x:
  kubernetesVersion: v1.29

Run without --dry-run to upgrade.

These are not destructive, so there is no confirmation prompt — dry-run just previews (unlike the delete commands, which preview + confirm).

Note

delete-auto-upgrade-config was intentionally kept (it backs a real DELETE /auto-upgrade-config endpoint) and already had --dry-run from v1.4.0.

Testing

  • go vet ./... clean; full go test ./... passes; build clean.
  • Verified all 5 dry-runs print the preview and exit 0 offline (no credentials).
  • Re-audited: no mutating VKS command is missing --dry-run.

🤖 Generated with Claude Code

Every mutating VKS command now supports --dry-run. Added it to
config-auto-healing, config-auto-upgrade, update-nodegroup-metadata,
upgrade-nodegroup-version, and generate-kubeconfig via a shared
cli.PrintDryRun(verb, target, body) helper that previews the request payload
(sorted keys) and the standard footer. The dry-run short-circuits before
createClient, so it needs no credentials/network.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vks-team vks-team merged commit 49a08d8 into main Jul 2, 2026
4 checks passed
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