Auto power-on after resize and interactive disk resize option#50
Conversation
ret2libc
left a comment
There was a problem hiding this comment.
Can't you use dropkit resize --no-disk test-resize instead of adding a new option? This will resize the droplet without resizing the disk.
|
Greg: TL;DR — Yes, Let me unpack my thinking here :)
From a TUI UX perspective, With Without: User sees the warning, panics, cancels, has to remember That said, I totally get that "where to draw the line on hand-holding in the CLI" is a judgment call. If you'd prefer to keep it flag-only, an alternative would be a more explicit warning like: "⚠ Disk resize is permanent — you will not be able to downsize later. Re-run with Ultimately my concern is about cognitive-overloaded peers who picked dropkit specifically to reduce the overhead of working with |
|
Ok - I read the code, and the warning is already present there... |
DigitalOcean leaves droplets powered off after resize, with no API flag
to auto-restart. Previously, `dropkit resize` completed silently with
the droplet off — users had to discover this and run `dropkit on`
manually.
Now the resize command:
1. Automatically powers the droplet back on after resize completes,
using the same pattern as `dropkit on` (with status polling and
progress messages).
2. Offers a "nodisk" answer in the confirmation prompt when disk resize
would increase disk size. This supports the common workflow of
temporarily scaling up CPU/RAM for heavy builds or benchmarks and
scaling back down later — which requires NOT resizing the disk
(disk resize is permanent and prevents future downsizing).
The prompt changes from:
Are you sure? [yes/no]
to:
Are you sure? [yes/nodisk/no]
with a tip explaining the option. The "nodisk" choice only appears
when relevant (disk flag is true AND new size has larger disk).
Expected terminal experience after resize:
✓ Resize completed successfully
Powering on droplet...
✓ Power on action started (ID: 3105287233)
Waiting for droplet to power on...
✓ Droplet powered on successfully
Droplet claude-code-box has been resized to s-2vcpu-4gb and is now active
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Per reviewer feedback, instead of a "nodisk" escape hatch in the
confirmation prompt, make --disk/--no-disk a tri-state (True/False/None).
When neither flag is passed, the user is asked interactively — consistent
with how region, size, and image are already handled.
The interactive question only appears when the new size has a different
disk size. It defaults to "no" (skip disk resize) since disk resize
is permanent and prevents future downsizing.
Flow with no flags:
Changes:
Disk: 25 GB → 80 GB (+55 GB)
Disk resize is PERMANENT and cannot be undone.
Skipping disk resize keeps the option to downsize later.
Resize disk too? [yes/no] (no):
Flow with --no-disk: skips the question, shows "not resized"
Flow with --disk: skips the question, proceeds with disk resize
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6a73fd8 to
d1c35ca
Compare
…ce guards Address ret2libc's review feedback: - Ask the interactive disk question BEFORE building the changes table, so the displayed disk row reflects the user's actual choice - Remove unnecessary isinstance(disk_diff, int) guards since disk_diff is always int (computed with an isinstance ternary that defaults to 0) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Thanks a lot for the patience and for addressing all the comments! |
Summary
AI Agent with Greg: We got caught with our droplet's pants down — resized it, went to SSH in, and found it sitting there powered off like a server that took an unauthorized coffee break. ☕🔌 Meanwhile, the disk resize nearly ate our ability to scale back down. Two papercuts, one patch.
Auto power-on after resize — DigitalOcean leaves droplets powered off after resize (no API flag exists to change this). The command now automatically powers the droplet back on with progress polling, instead of leaving users to discover a cold droplet and manually run
dropkit on.Interactive disk resize option —
--disk/--no-diskis now a tri-state (True/False/None). When neither flag is passed and the new size has a different disk allocation, the user gets an interactive prompt asking whether to include disk in the resize. The prompt warns that disk resize is permanent and defaults to "no" to protect reversibility. Power users can still pass--diskor--no-diskexplicitly to skip the prompt.Use case: temporary scale-up
Technical notes
--disk/--no-diskis not specified AND the new size has a different disk allocationdropkit on: 120s timeout, action ID validation,console.status()spinnerpower_on_after_resizeparameter exists — two sequential API calls (resize → power_on) is the only pathTest plan
uv run ruff check dropkit/main.py— passeduv run ruff format --check dropkit/main.py— passedprek run— all checks passed--disk(no prompt, disk resized)--no-disk(no prompt, disk skipped)🤖 Generated with Claude Code