Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --wait flag to databases migrate command #1584

Closed
loosla opened this issue Sep 25, 2024 · 8 comments · Fixed by #1591
Closed

Add --wait flag to databases migrate command #1584

loosla opened this issue Sep 25, 2024 · 8 comments · Fixed by #1591

Comments

@loosla
Copy link
Contributor

loosla commented Sep 25, 2024

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:

  • doctl database create --wait
  • doctl compute droplet create --wait
  • doctl kubernetes cluster create --wait
  • doctl apps create --wait

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:

if wait {

@shashank-priyadarshi
Copy link

@loosla can I please take this up?

@loosla
Copy link
Contributor Author

loosla commented Sep 30, 2024

@shashank-priyadarshi We would certainly value your input. 👍

@SkySingh04
Copy link
Contributor

This looks like a fun issue, Will be working on this!

@shashank-priyadarshi
Copy link

shashank-priyadarshi commented Oct 8, 2024

@SkySingh04 it will possibly be duplicate effort as I have already started work on this.
@loosla can you please mark this issue as assigned?

@loosla
Copy link
Contributor Author

loosla commented Oct 8, 2024

I appreciate everyone's interest in contributing! Just a friendly reminder: when we assign someone to a PR in an open repository, it can sometimes limit opportunities for other developers to contribute, it may lead to issues being abandoned and work not progressing.

We generally would like to follow a first-come, first-served approach for assignments to ensure fairness.

I recommend leaving a comment to let others know you've started working on this issue and link your PR, along with an approximate timeline for when you expect to finish. This way, everyone will be aware that you're handling it.

Thank you for your understanding! 🌊 🐬 🌊

@SkySingh04
Copy link
Contributor

Thank you for the clarification @loosla , Do you recommend I work on this issue or can you point me towards any other CLI issue I can work towards? I have worked extensively on the Keploy CLI tool before.

@shashank-priyadarshi
Copy link

I recommend leaving a comment to let others know you've started working on this issue and link your PR, along with an approximate timeline for when you expect to finish. This way, everyone will be aware that you're handling it.

Sure thanks @loosla .
I have indeed started work on this in the past week, and looking to close this by Mon.

SkySingh04 added a commit to SkySingh04/doctl that referenced this issue Oct 15, 2024
Signed-off-by: Akash <akashsingh2210670@gmail.com>
@SkySingh04
Copy link
Contributor

Hey @loosla , Since the deadline for this was Monday and no PR was raised, I have raised a PR for this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants