Skip to content

feat: consistent wait across all commands #506

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

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

avirtopeanu-ionos
Copy link
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.

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