Skip to content

fix/feat(cli): waiter fatal errors, --dry-run standardization, rename + secret masking#23

Merged
vks-team merged 3 commits into
mainfrom
fix/waiter-fatal-error
Jul 1, 2026
Merged

fix/feat(cli): waiter fatal errors, --dry-run standardization, rename + secret masking#23
vks-team merged 3 commits into
mainfrom
fix/waiter-fatal-error

Conversation

@vks-team

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

Copy link
Copy Markdown
Contributor

Summary

Several CLI-correctness, consistency, and hardening improvements.

1. Waiter aborts on permanent errors (bugfix)

grn vks wait treated every describe error as transient and polled until timeout, so a 403 Forbidden hung for the full attempt budget (~80 polls). Waiters now abort immediately on permanent client errors (400/401/403, and 404 for an active waiter) with exit 255; transient errors (5xx, network) still retry; the deleted waiter still treats 404 as success.

2. --dry-run standardized on destructive commands (enhancement)

Shared helpers cli.DryRunNotice(verb) + cli.Confirm(force, prompt) drive a consistent preview → --dry-run short-circuit → [y/N] confirm flow. Added --dry-run where missing:

  • vServer: server stop/reboot/delete, volume/vpc/subnet/secgroup/secgroup-rule delete
  • VKS: delete-auto-upgrade-config

vks delete-cluster/delete-nodegroup retrofitted to the shared helpers (prompt unified (yes/no)[y/N]).

3. Rename set-auto-upgrade-configconfig-auto-upgrade (api-change)

Old name kept as a deprecated cobra alias; docs updated.

4. Mask secrets in configure set output (bugfix / hardening)

configure set client_secret <SECRET> echoed the raw secret to stdout, leaking it into scrollback / CI logs / redirects — even though configure list already masks. Now client_id/client_secret are masked in the confirmation line (same MaskCredential helper); non-sensitive values still shown.

Testing

  • New/updated tests: waiter evaluators (403/404/500), cli.Confirm force path, displaySetValue masking.
  • go vet ./... clean; full go test ./... passes; build clean; --help/--dry-run/rename/alias/mask verified via the binary.

🤖 Generated with Claude Code

tytv2 and others added 2 commits July 1, 2026 15:08
The waiters treated every describe() error as transient and kept polling, so a
403 Forbidden (a key without permission) hung for the full attempt budget
(e.g. 80 polls). Evaluators now return a fatal error for permanent client
errors (400/401/403, and 404 for an active waiter) and runWaiter aborts
immediately with exit 255. Transient errors (5xx, network) still retry; the
deleted waiter still treats 404 as success.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…auto-upgrade-config

Add shared cli.DryRunNotice/cli.Confirm helpers and apply a consistent
preview -> --dry-run short-circuit -> [y/N] confirmation flow across destructive
commands. Add --dry-run where it was missing: vServer server stop/reboot/delete,
volume/vpc/subnet/secgroup/secgroup-rule delete, and vks
delete-auto-upgrade-config. Existing vks delete-cluster/delete-nodegroup are
retrofitted to the shared helpers (confirmation prompt unified to [y/N]).

Rename `vks set-auto-upgrade-config` to `vks config-auto-upgrade`, keeping the
old name as a deprecated cobra alias for backward compatibility.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vks-team vks-team changed the title fix(vks): wait aborts on permanent errors instead of polling to timeout fix/feat(cli): waiter fatal errors, --dry-run standardization, rename config-auto-upgrade Jul 1, 2026
`configure set client_secret <SECRET>` echoed the raw secret to stdout
("Set 'client_secret' to '<SECRET>' ..."), leaking it into terminal
scrollback, CI logs, and redirects — even though `configure list` already
masks it. Mask client_id/client_secret in the confirmation line using the same
MaskCredential helper; non-sensitive values (region/output/project_id) are
still shown in full.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vks-team vks-team changed the title fix/feat(cli): waiter fatal errors, --dry-run standardization, rename config-auto-upgrade fix/feat(cli): waiter fatal errors, --dry-run standardization, rename + secret masking Jul 1, 2026
@vks-team vks-team merged commit ac051ee into main Jul 1, 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