Skip to content

feat: consistent wait across all commands#506

Open
avirtopeanu-ionos wants to merge 35 commits intomasterfrom
feat/wait
Open

feat: consistent wait across all commands#506
avirtopeanu-ionos wants to merge 35 commits intomasterfrom
feat/wait

Conversation

@avirtopeanu-ionos
Copy link
Copy Markdown
Contributor

@avirtopeanu-ionos avirtopeanu-ionos commented Mar 25, 2025

Adds global --wait / -w flag.

Adds per-command --timeout flag and also -t shorthand if it is not already defined. (We cannot add a global --timeout flag while conditionally adding -t shorthand - there are some commands that already define this -t shorthand for something else.)

Adds a httpClient which we use to dynamically wait based on the retrieved href

We can find the href by pausing (catch the output in a buffer) after executing a command, and then working from there with what info we caught through the printer pkg. If we don't have the href yet, try running the equivalent get command with whatever flags are common between the two commands.

KNOWN ISSUES

  1. The default timeout might be too low. It is consistently not enough for kubernetes resources, and the resources are still DEPLOYING when the waiting ends.

  2. if using --wait:

  • and using a command with no output (e.g. delete) that does not throw an error and is a success
  • and the equivalent GET command exists and is found
  • and this command throws an error when executed
  • then, the CLI prints the GET command's error, but still exits with status 0.
  1. Some DBaaS APIs don't have href as a response key

@sonarqubecloud
Copy link
Copy Markdown

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