feat(vks): add --dry-run to remaining mutating commands#25
Merged
Conversation
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>
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
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-healingconfig-auto-upgradeupdate-nodegroup-metadataupgrade-nodegroup-versiongenerate-kubeconfigBehavior
For these config/update-style commands,
--dry-runpreviews the request payload and exits beforecreateClient— so it needs no credentials or network. A shared helpercli.PrintDryRun(verb, target, body)keeps the output consistent (sorted keys + the standardRun without --dry-run to <verb>.footer):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-configwas intentionally kept (it backs a realDELETE /auto-upgrade-configendpoint) and already had--dry-runfrom v1.4.0.Testing
go vet ./...clean; fullgo test ./...passes; build clean.--dry-run.🤖 Generated with Claude Code