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

Go runtime panic using rpk cloud cluster select #18270

Closed
voutilad opened this issue May 6, 2024 · 0 comments · Fixed by #18274
Closed

Go runtime panic using rpk cloud cluster select #18270

voutilad opened this issue May 6, 2024 · 0 comments · Fixed by #18274
Labels
area/rpk kind/bug Something isn't working

Comments

@voutilad
Copy link
Contributor

voutilad commented May 6, 2024

Version & Environment

Version:     v24.1.1
Git ref:     b5ade3f403
Build date:  2024-04-30T22:48:05Z
OS/Arch:     darwin/arm64
Go version:  go1.22.2

What went wrong?

% rpk cloud cluster select --verbose
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/redpanda-data/redpanda/src/go/rpk/pkg/cli/cloud/cluster.newSelectCommand.func1(0x1400042cf08, {0x1400042fbe0, 0x0, 0x104d8ca21?})
	/var/lib/buildkite-agent/builds/buildkite-k8s-builders-i-08ee5d882724975d5-1/redpanda/redpanda/src/go/rpk/pkg/cli/cloud/cluster/select.go:66 +0x3b0
github.com/spf13/cobra.(*Command).execute(0x1400042cf08, {0x1400042fbd0, 0x1, 0x1})
	/var/lib/buildkite-agent/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x140003dc908)
	/var/lib/buildkite-agent/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
	/var/lib/buildkite-agent/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/redpanda-data/redpanda/src/go/rpk/pkg/cli.Execute()
	/var/lib/buildkite-agent/builds/buildkite-k8s-builders-i-08ee5d882724975d5-1/redpanda/redpanda/src/go/rpk/pkg/cli/root.go:172 +0xaa0
main.main()
	/var/lib/buildkite-agent/builds/buildkite-k8s-builders-i-08ee5d882724975d5-1/redpanda/redpanda/src/go/rpk/cmd/rpk/main.go:15 +0x1c

What should have happened instead?

No panic 🫨

How to reproduce the issue?

  1. Authenticate to a Redpanda cloud environment using rpk
  2. Run rpk cloud cluster select

Additional information

n/a

JIRA Link: CORE-2802

@voutilad voutilad added kind/bug Something isn't working area/rpk labels May 6, 2024
r-vasquez added a commit to r-vasquez/redpanda that referenced this issue May 6, 2024
There might be cases where the user is using
rpk cloud cluster select in a single-cluster org
and args will be null, causing a panic.

Fixes redpanda-data#18270
r-vasquez added a commit to r-vasquez/redpanda that referenced this issue May 8, 2024
There might be cases where the user is using
rpk cloud cluster select in a single-cluster org
and args will be null, causing a panic.

Fixes redpanda-data#18270
vbotbuildovich pushed a commit to vbotbuildovich/redpanda that referenced this issue May 8, 2024
There might be cases where the user is using
rpk cloud cluster select in a single-cluster org
and args will be null, causing a panic.

Fixes redpanda-data#18270

(cherry picked from commit 3a9d171)
bharathv pushed a commit to bharathv/redpanda that referenced this issue May 13, 2024
There might be cases where the user is using
rpk cloud cluster select in a single-cluster org
and args will be null, causing a panic.

Fixes redpanda-data#18270
Lazin pushed a commit to Lazin/redpanda that referenced this issue Jun 1, 2024
There might be cases where the user is using
rpk cloud cluster select in a single-cluster org
and args will be null, causing a panic.

Fixes redpanda-data#18270
Lazin pushed a commit to Lazin/redpanda that referenced this issue Jun 12, 2024
There might be cases where the user is using
rpk cloud cluster select in a single-cluster org
and args will be null, causing a panic.

Fixes redpanda-data#18270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rpk kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant