Auto power-on after resize and add 'nodisk' confirmation option#50
Open
gwpl wants to merge 1 commit intotrailofbits:mainfrom
Open
Auto power-on after resize and add 'nodisk' confirmation option#50gwpl wants to merge 1 commit intotrailofbits:mainfrom
gwpl wants to merge 1 commit intotrailofbits:mainfrom
Conversation
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>
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
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.nodiskconfirmation escape hatch — When disk resize would increase disk size, the confirmation prompt offersyes/nodisk/noinstead ofyes/no. This supports the common workflow of temporarily scaling up CPU/RAM (e.g. for a heavy build) and scaling back down later — which requires NOT resizing the disk (disk resize is permanent and blocks future downsizing).Use case: temporary scale-up
Technical notes
nodiskoption only appears when relevant: disk flag is true (default) AND the new size has a larger diskdropkit 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— all checks passeduv run ruff format --check dropkit/main.py— already formatteduv run ty check dropkit/main.py— all checks passeduv run pytest tests/ -v— 288 tests passed, 31% coverage (above 29% minimum)dropkit resize <name> --size <bigger>— verifynodiskoption appears, auto power-on worksdropkit resize <name> --size <bigger> --no-disk— verifynodiskoption does NOT appear (already skipping disk)dropkit resize <name> --size <same-disk-size>— verifynodiskoption does NOT appear (no disk change)dropkit on🤖 Generated with Claude Code — your friendly neighborhood security-conscious AI, now also a sysadmin who remembers to turn the lights back on
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com