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

panic on tanzu package installed status #1160

Closed
clebs opened this issue Apr 5, 2023 · 2 comments · Fixed by #1161 or #1163
Closed

panic on tanzu package installed status #1160

clebs opened this issue Apr 5, 2023 · 2 comments · Fixed by #1161 or #1163
Labels
bug This issue describes a defect or unexpected behavior

Comments

@clebs
Copy link
Contributor

clebs commented Apr 5, 2023

What steps did you take:
Run tanzu package installed status without any argument.

What happened:
The program panicked:

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd/package/installed.(*StatusOptions).Run(0xc000126210?, {0x3969940?, 0xc000330240?, 0x39385a0?})
	/go/pkg/mod/github.com/vmware-tanzu/carvel-kapp-controller/cli@v0.0.0-20230106043644-ad24bdc3e412/pkg/kctrl/cmd/package/installed/status.go:64 +0x417
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd/package/installed.NewStatusCmd.func1(0xc000033080?, {0x3969940?, 0xa?, 0xc00013eab3?})
	/go/pkg/mod/github.com/vmware-tanzu/carvel-kapp-controller/cli@v0.0.0-20230106043644-ad24bdc3e412/pkg/kctrl/cmd/package/installed/status.go:40 +0x25
github.com/vmware-tanzu/carvel-kapp-controller/cli/pkg/kctrl/cmd.configureGlobalFlags.func1.1(0x0?, {0x3969940, 0x0, 0x0})
	/go/pkg/mod/github.com/vmware-tanzu/carvel-kapp-controller/cli@v0.0.0-20230106043644-ad24bdc3e412/pkg/kctrl/cmd/kctrl.go:141 +0xce
github.com/cppforlife/cobrautil.WrapRunEForCmd.func1.1(0x0?, {0x3969940, 0x0, 0x0})
	/go/pkg/mod/github.com/cppforlife/cobrautil@v0.0.0-20221130162803-acdfead391ef/misc.go:45 +0x6d
github.com/cppforlife/cobrautil.WrapRunEForCmd.func1.1(0x0?, {0x3969940, 0x0, 0x0})
	/go/pkg/mod/github.com/cppforlife/cobrautil@v0.0.0-20221130162803-acdfead391ef/misc.go:45 +0x6d
github.com/cppforlife/cobrautil.WrapRunEForCmd.func1.1(0xc00023bb80?, {0x3969940, 0x0, 0x0})
	/go/pkg/mod/github.com/cppforlife/cobrautil@v0.0.0-20221130162803-acdfead391ef/misc.go:45 +0x6d
github.com/spf13/cobra.(*Command).execute(0xc00023bb80, {0x3969940, 0x0, 0x0})
	/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc000199400)
	/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
github.com/vmware-tanzu/tanzu-framework/cli/runtime/plugin.(*Plugin).Execute(...)
	/go/src/cayman-tanzu-framework/tanzu-framework/src/cli/runtime/plugin/plugin.go:60
main.main()
	/go/src/cayman-tanzu-framework/tanzu-framework/src/cmd/cli/plugin/package/main.go:44 +0x92

What did you expect:
The program should provide a meaningful error message and exit properly.

Environment:

  • kapp Controller version (execute kubectl get deployment -n kapp-controller kapp-controller -o yaml and the annotation is kbld.k14s.io/images):
  • Kubernetes version (use kubectl version)

Not applicable.


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.

@clebs clebs added bug This issue describes a defect or unexpected behavior carvel-triage This issue has not yet been reviewed for validity labels Apr 5, 2023
@carvel-bot carvel-bot added this to Carvel Apr 5, 2023
@github-project-automation github-project-automation bot moved this to Closed in Carvel Apr 5, 2023
@github-actions github-actions bot removed the carvel-triage This issue has not yet been reviewed for validity label Apr 5, 2023
@praveenrewar
Copy link
Member

Keeping this open for other commands!

@praveenrewar praveenrewar reopened this Apr 5, 2023
@github-project-automation github-project-automation bot moved this from Closed to In Progress in Carvel Apr 5, 2023
@github-actions github-actions bot added the carvel-triage This issue has not yet been reviewed for validity label Apr 5, 2023
@clebs
Copy link
Contributor Author

clebs commented Apr 6, 2023

Thanks @praveenrewar, just added a new PR fixing all other commands.
Please take a look!

@github-project-automation github-project-automation bot moved this from In Progress to Closed in Carvel Apr 6, 2023
@github-actions github-actions bot removed the carvel-triage This issue has not yet been reviewed for validity label Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect or unexpected behavior
Projects
Archived in project
2 participants