argo-workflows: `argo auth token` fails with `http: nil Request.URL` error
Summary
What happened/what you expected to happen?
Using version 3.1.5 I was able to run argo auth token
and get an authentication token.
After upgrading to 3.2.3 I get an error when running that command
> argo auth token
FATA[2021-11-05T13:06:07.303Z] http: nil Request.URL
What version is it broken in? 3.2.3
What version was it working in? 3.1.5
Diagnostics
My kube config is otherwise valid and I can do all other kubectl
operation on the cluster
With debug, I get:
> argo auth token -v
DEBU[2021-11-05T13:02:24.571Z] CLI version version="{v3.2.3 2021-10-27T02:10:33Z e5dc961b7846efe0fe36ab3a0964180eaedd2672 v3.2.3 clean go1.16.9 gc darwin/amd64}"
I1105 13:02:24.573193 29379 loader.go:372] Config loaded from file: /Users/david/.kube/config
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x12103aa]
goroutine 1 [running]:
net/url.(*URL).String(0x0, 0xc0000a8528, 0x0)
/opt/hostedtoolcache/go/1.16.9/x64/src/net/url/url.go:813 +0x4a
k8s.io/client-go/transport.newRequestInfo(...)
/home/runner/go/pkg/mod/k8s.io/client-go@v0.21.5/transport/round_trippers.go:323
k8s.io/client-go/transport.(*debuggingRoundTripper).RoundTrip(0xc000447e18, 0xc00071a600, 0xa, 0x3623033, 0x5)
/home/runner/go/pkg/mod/k8s.io/client-go@v0.21.5/transport/round_trippers.go:429 +0x47
k8s.io/client-go/transport.(*userAgentRoundTripper).RoundTrip(0xc0008e2620, 0xc00071a600, 0x362c148, 0xa, 0xc000493528)
/home/runner/go/pkg/mod/k8s.io/client-go@v0.21.5/transport/round_trippers.go:156 +0x286
github.com/argoproj/argo-workflows/v3/util/kubeconfig.userAgentRoundTripper.RoundTrip(0x3623033, 0x5, 0x44054a0, 0xc0008e2620, 0xc00071a600, 0x0, 0x36289ee, 0x100ddbb)
/home/runner/work/argo-workflows/argo-workflows/util/kubeconfig/roundtripper.go:12 +0x109
github.com/argoproj/argo-workflows/v3/util/kubeconfig.GetBearerToken(0xc000236900, 0x0, 0x0, 0x1054b67, 0x0, 0xc000a3fbc8, 0x3)
/home/runner/work/argo-workflows/argo-workflows/util/kubeconfig/kubeconfig.go:175 +0x42f
github.com/argoproj/argo-workflows/v3/util/kubeconfig.GetAuthString(0xc000236900, 0x0, 0x0, 0x43d0310, 0x1, 0xc000114340, 0x1e)
/home/runner/work/argo-workflows/argo-workflows/util/kubeconfig/kubeconfig.go:124 +0xde
github.com/argoproj/argo-workflows/v3/cmd/argo/commands/client.GetAuthString(0x43cfc24, 0x6)
/home/runner/work/argo-workflows/argo-workflows/cmd/argo/commands/client/conn.go:102 +0x253
github.com/argoproj/argo-workflows/v3/cmd/argo/commands/auth.NewTokenCommand.func1(0xc0003edb80, 0xc0009c6ff0, 0x0, 0x1)
/home/runner/work/argo-workflows/argo-workflows/cmd/argo/commands/auth/token.go:21 +0x30
github.com/spf13/cobra.(*Command).execute(0xc0003edb80, 0xc0009c6fe0, 0x1, 0x1, 0xc0003edb80, 0xc0009c6fe0)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:860 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc0009f0280, 0xc000084778, 0xc000a3ff78, 0x1006045)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
main.main()
/home/runner/work/argo-workflows/argo-workflows/cmd/argo/main.go:14 +0x2b
This issue might be related but different? https://github.com/argoproj/argo-workflows/pull/6344
What Kubernetes provider are you using? EKS
What executor are you running? Docker/K8SAPI/Kubelet/PNS/Emissary
N/A
Message from the maintainers:
Impacted by this regression? Give it a 👍. We prioritise the issues with the most 👍.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 10
- Comments: 24 (13 by maintainers)
Commits related to this issue
- fix: Prevent nil panic. Fixes #7175 Signed-off-by: Alex Collins <alex_collins@intuit.com> — committed to argoproj/argo-workflows by alexec 3 years ago
- fix: Fix `argo auth token`. Fixes #7175 (#7186) Signed-off-by: Alex Collins <alex_collins@intuit.com> — committed to argoproj/argo-workflows by alexec 3 years ago
- fix: Fix `argo auth token`. Fixes #7175 (#7186) Signed-off-by: Alex Collins <alex_collins@intuit.com> — committed to alexec/argo-workflows by alexec 3 years ago
- fix: Fix `argo auth token`. Fixes #7175 (#7186) Signed-off-by: Alex Collins <alex_collins@intuit.com> — committed to argoproj/argo-workflows by alexec 3 years ago
- Enables Argo-workflow Server UI Enables the Argo-workflow server UI in the cluster. This will allow users to view and potentially troubleshoot workflows. Note that this work is about making the UI w... — committed to alphagov/govuk-infrastructure by fredericfran-gds 2 years ago
@alexec Success!! Thanks for figuring this out.