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

--wait flag on package install doesn't do anything when the wait timeout expires before the package is healthy #5149

Closed
djeremiah opened this issue Dec 19, 2023 · 1 comment · Fixed by #5207
Labels
bug Something isn't working

Comments

@djeremiah
Copy link
Contributor

What happened?

https://docs.crossplane.io/v1.14/cli/command-reference/#wait-for-package-install says that --wait will error out if the timeout is hit before the package becomes healthy. This is not true. It just stops waiting and reports success, whether the package is healthy or not.

How can we reproduce it?

Install a configuration package with a large number of dependencies. The package won't report healthy until all of the dependencies are installed, but the install command will exit anyway.

crossplane xpkg install configuration ghcr.io/back-stack/showcase-configuration:latest --wait=30s && kubectl get configuration

NAME                                INSTALLED   HEALTHY   PACKAGE                                            AGE
back-stack-showcase-configuration   True        Unknown   ghcr.io/back-stack/showcase-configuration:latest   30s

I would expect the command to error out, as described in the docs.

What environment did it happen in?

Crossplane version:
1.14.4-up.1

kind v0.20.0 go1.20.5 darwin/arm64
Client Version: v1.28.4
Server Version: v1.27.3

@djeremiah djeremiah added the bug Something isn't working label Dec 19, 2023
@phisco
Copy link
Contributor

phisco commented Dec 27, 2023

Indeed, the flag help message doesn't mention failure, so there is indeed a mismatch with the documentation, so this should either be a bug for the documentation or an enhancement for the CLI.

Looking at other tools:

  • Helm does return exit code 1 when an helm upgrade|install --wait --timeout ... hits the configured timeout
  • same goes for kubectl wait --timeout

So, I'd say it would make sense to error out here too, as it doesn't make sense to wait at all if in the end I'm not sure whether the resource was successfully installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants