carvel-dev / carvel-dev/kapp-controller

`kctrl`: Incorrect error message when package not present

Open
#1,344 0 comments 0 reactions 1 assignee Claimed by @rcmadhankumar View on GitHub
bug carvel-accepted priority/important-soon
Dominant language
Go
Stars
323
Forks
127
Avg merge
2d 16h
Merged PRs (30d)
4

Description

**What steps did you take:**
I tried installing a package for which the version didn't exist:
```bash
kctrl package install -i foo -p foo.myorg.com -v 1.0.0 -n test-ns --values-file ~/Workspace/test-yaml/kc/kc-package-test/itr2/kc-package-values.yml
Target cluster 'https://192.168.64.23:8443' (nodes: minikube)

8:39:53PM: Creating service account 'foo-test-ns-sa'
8:39:53PM: Creating cluster admin role 'foo-test-ns-cluster-role'
8:39:53PM: Creating cluster role binding 'foo-test-ns-cluster-rolebinding'
8:39:53PM: Creating secret 'foo-test-ns-values'
8:39:53PM: Creating overlay secrets
8:39:53PM: Creating package install resource
8:39:53PM: Waiting for PackageInstall reconciliation for 'foo'

kctrl: Error: packageinstall/foo (packaging.carvel.dev/v1alpha1) namespace: test-ns:
Reconciling: . Reconcile failed:
Package foo.myorg.com not found
```
^This works as expected, but when I try running the same command again, I got a different error:
```bash
kctrl package install -i foo -p foo.myorg.com -v 1.0.0 -n test-ns --values-file ~/Workspace/test-yaml/kc/kc-package-test/itr2/kc-package-values.yml
Target cluster 'https://192.168.64.23:8443' (nodes: minikube)

8:39:55PM: Pausing reconciliation for package installation 'foo' in namespace 'test-ns'

kctrl: Error: Waiting for app 'foo' in namespace 'test-ns' to be paused: apps.kappctrl.k14s.io "foo" not found
```

**What happened:**
kctrl tried to update the existing package install, and while doing so, it first tried to pause the app cr which doesn't exists yet as the package itself was not found.

**What did you expect:**
I expected the correct error message to pop up again.

---
Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.