Skip to content

APICLI-5357: add microvm fork and the fork-id and forked-from list filters - #2157

Merged
kishlay-singh-DO merged 4 commits into
digitalocean:mainfrom
rak16:rahmadkhan/APICLI-5357/microvm-fork
Nov 27, 2026
Merged

kishlay-singh-DO merged 4 commits into
digitalocean:mainfrom
rak16:rahmadkhan/APICLI-5357/microvm-fork

Conversation

@rak16

@rak16 rak16 commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Adds doctl compute microvm fork <microvm-id>, which creates copies of a running or paused MicroVM, and two list filters for finding the copies afterwards.

What changed

  • doctl compute microvm fork <microvm-id> with --count, --name, --tag, --wait and --wait-timeout. The command reports the fork ID; with --wait it blocks until every copy is running or has failed, and exits non-zero if any copy failed.
  • doctl compute microvm list gains --fork-id (the copies one fork created) and --forked-from (every MicroVM forked from a given MicroVM).
  • The MicroVM output gains optional ForkID and ForkedFrom columns, available through --format.
  • Forking is not idempotent, so the fork request is sent once even when --http-retry-max is set. On a 5xx or transport error the next step points at doctl compute microvm list --forked-from <id> instead of suggesting the command be run again.

godo
Updated to github.com/digitalocean/godo v1.247.0 (includes digitalocean/godo#1245).

Testing

  • Unit tests for the fork command, the wait path, the list filters and the no-retry client.
  • integration/microvm_fork_test.go runs the built binary against a test server and checks that a fork answered with 502 is sent exactly once.

…lters

doctl compute microvm fork <microvm-id> creates copies of a running or
paused MicroVM. The command reports the fork ID, and --wait blocks until
every copy is running or has failed.

Forking is not idempotent, so the fork request goes through a client with
retries off, and a 5xx or transport error points at
`doctl compute microvm list --forked-from <id>` instead of the default
hint to run the command again.

doctl compute microvm list gains --fork-id and --forked-from, and the
MicroVM output gains optional ForkID and ForkedFrom columns.

godo is pinned to the merge commit of digitalocean/godo#1245
(v1.246.1-0.20261125165214-b34674bdccff), which is not in a tagged
release yet. It also brings two hosted-agents changes merged after
v1.246.0.
@rak16
rak16 marked this pull request as ready for review November 25, 2026 18:28
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.

2 participants