Skip to content

Allow resizing hibernated droplets by modifying the size tag#34

Open
Ninja3047 wants to merge 1 commit intomainfrom
resizable-hibernated
Open

Allow resizing hibernated droplets by modifying the size tag#34
Ninja3047 wants to merge 1 commit intomainfrom
resizable-hibernated

Conversation

@Ninja3047
Copy link

@Ninja3047 Ninja3047 commented Feb 14, 2026

Summary

  • Resize hibernated snapshotsdropkit resize <name> now works on hibernated droplets by swapping the size: tag on the snapshot, so the next wake creates the droplet with the new size. No need to wake, resize, and re-hibernate.
  • New untag_resource API method — adds DELETE /tags/{tag}/resources support to complement the existing tag_resource.
  • Improved find_user_droplet return type — always returns the username (never None), simplifying error handling across 8+ call sites that no longer need username null checks.
  • Better hibernated listingdropkit list now shows both the droplet size slug and image size for hibernated snapshots.
  • Housekeeping — removes accidentally committed .coverage file, adds it to .gitignore.

How it works

When resizing a hibernated snapshot:

  1. Reads the current size from the size:<slug> tag on the snapshot
  2. Validates the new size against available DO sizes
  3. Atomically swaps the tag: creates and applies the new size:<new> tag first, then removes the old size:<old> tag (crash-safe ordering)

Test plan

  • Unit tests for _resize_hibernated_snapshot (no ID, no size tag, same size, successful swap, cancelled, invalid size)
  • Unit tests for untag_resource API method
  • Unit tests for complete_droplet_or_snapshot_name (combines sources, deduplicates, ordering)
  • Manual: dropkit resize <hibernated-name> prompts interactively and updates tag
  • Manual: dropkit resize <hibernated-name> -s s-2vcpu-4gb updates tag non-interactively
  • Manual: dropkit list shows droplet size column for hibernated snapshots
  • Manual: dropkit wake <name> uses updated size after resize

🤖 Generated with Claude Code

@Ninja3047 Ninja3047 requested a review from ret2libc as a code owner February 14, 2026 20:22
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