Skip to content

Add dry-run guardrails for scale commands#145

Open
bolasse1234 wants to merge 1 commit into
profullstack:masterfrom
bolasse1234:cli-scale-dry-run-guardrails
Open

Add dry-run guardrails for scale commands#145
bolasse1234 wants to merge 1 commit into
profullstack:masterfrom
bolasse1234:cli-scale-dry-run-guardrails

Conversation

@bolasse1234
Copy link
Copy Markdown

Closes #144. Related to #133.

This follows the docs convention that commands which spend money or change live systems should be previewable with --dry-run.

What changed:

  • added --dry-run to mutating scale commands: up, down, �uto, dns,
    ollout, and deploy destroy
  • updated the docs examples/options for those scale commands
  • changed scale rollout --version to --release because Commander already uses --version as the top-level CLI version flag, so the documented rollout command could not actually run
  • added a focused regression test for the dry-run guardrails and the rollout flag conflict

Verified:

  • corepack pnpm --filter @profullstack/sh1pt typecheck
  • corepack pnpm vitest run packages/cli/src/commands/dry-run-guardrails.test.ts
  • corepack pnpm --filter @profullstack/sh1pt-core --filter @profullstack/sh1pt-policy --filter @profullstack/sh1pt build
  • corepack pnpm --filter sh1pt-dot-com build
  • smoke-tested scale up, scale rollout, and scale deploy destroy through sx packages/cli/src/index.ts

I kept the command behavior as stubs; this only makes the planned mutating operations previewable and fixes the rollout option name so it does not collide with the CLI version flag.

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 dry-run guardrails for mutating scale commands

1 participant