digitalocean / doctl

The official command line interface for the DigitalOcean API.
https://docs.digitalocean.com/reference/doctl/
Apache License 2.0
3.25k stars 388 forks source link

Add --wait flag to databases migrate command #1584

Open loosla opened 1 week ago

loosla commented 1 week ago

What is the problem this feature would solve? Please describe. doctl aims to be useful in scripting. One way it does this is by providing a --wait flag for long running, async operations to block until they are complete rather than making the user implement polling in their own script. Some examples include:

Currently the doctl databases migrate command does not have a --wait flag.

Describe the solution you'd like Add a --wait flag to the doctl databases migrate command. It should poll the /v2/databases/$DATABASE_ID/migrate, blocking until the database cluster's status attribute moves from migrating to online.

Additional context Following the code path starting here demonstrates how doctl database create's --wait flag is implemented:

https://github.com/digitalocean/doctl/blob/de1918ad1ee4b1e523c335fa9254e85d415d18aa/commands/apps.go#L282

shashank-priyadarshi commented 5 days ago

@loosla can I please take this up?

loosla commented 5 days ago

@shashank-priyadarshi We would certainly value your input. :+1: