replicatedhq / replicatedhq/kots
"make test" fails on fresh macOS checkout with panic
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 950
- Forks
- 98
- Avg merge
- 1d 36m
- Merged PRs (30d)
- 31
Description
I'm trying to run some tests on a branch, and noticed this panic. Looks like it reproduces in a fresh checkout from master. Am I missing some config? I noticed this test and the other ones panicking have a scope agent configured in case that's relevant...?
...snip...
--- FAIL: TestTemplateConfig (0.86s)
--- FAIL: TestTemplateConfig/basic,_no_template_functions (0.86s)
panic: no Auth Provider found for name "gcp" [recovered]
panic: no Auth Provider found for name "gcp"
goroutine 14 [running]:
testing.tRunner.func1.1(0x2716f60, 0xc0008c5310)
/Users/dex/homebrew/Cellar/go/1.14/libexec/src/testing/testing.go:941 +0x3d0
testing.tRunner.func1(0xc000280480)
/Users/dex/homebrew/Cellar/go/1.14/libexec/src/testing/testing.go:944 +0x3f9
panic(0x2716f60, 0xc0008c5310)
/Users/dex/homebrew/Cellar/go/1.14/libexec/src/runtime/panic.go:967 +0x15d
github.com/replicatedhq/kurl/kurlkinds/client/kurlclientset/typed/cluster/v1beta1.NewForConfigOrDie(...)
/Users/dex/go/pkg/mod/github.com/replicatedhq/kurl/kurlkinds@v0.0.0-20200306230415-b6d377a48a56/client/kurlclientset/typed/cluster/v1beta1/cluster_client.go:58
github.com/replicatedhq/kots/pkg/template.GetKurlValues(0x29bc001, 0x4, 0x29c0187, 0x7, 0x2816c60)
/Users/dex/tmp/kots/pkg/template/kurl_context.go:25 +0x1c0
github.com/replicatedhq/kots/pkg/template.NewKurlContext(0x29bc001, 0x4, 0x29c0187, 0x7, 0xc0005b3418)
/Users/dex/tmp/kots/pkg/template/kurl_context.go:43 +0x86
github.com/replicatedhq/kots/pkg/template.(*Builder).newConfigContext(0xc0005b3bd8, 0xc0000a6d20, 0x1, 0x1, 0xc0007f8c30, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/dex/tmp/kots/pkg/template/config_context.go:83 +0x106
github.com/replicatedhq/kots/pkg/template.NewBuilder(0xc0000a6d20, 0x1, 0x1, 0xc0007f8c30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/dex/tmp/kots/pkg/template/builder.go:26 +0xd5
github.com/replicatedhq/kots/pkg/config.templateConfig(0xc00009c800, 0x2a6b0b5, 0x155, 0x2a4b471, 0x8a, 0x2a77dd2, 0x220, 0x0, 0x0, 0x0, ...)
/Users/dex/tmp/kots/pkg/config/config.go:56 +0x6c5
github.com/replicatedhq/kots/pkg/config.TestTemplateConfig.func1(0xc000280480)
/Users/dex/tmp/kots/pkg/config/config_test.go:257 +0x2d0
testing.tRunner(0xc000280480, 0xc000130bd0)
/Users/dex/homebrew/Cellar/go/1.14/libexec/src/testing/testing.go:992 +0xdc
created by testing.(*T).Run
/Users/dex/homebrew/Cellar/go/1.14/libexec/src/testing/testing.go:1043 +0x357
...snip...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with TestTemplateConfig in pkg/config/config_test.go and follow the stack into pkg/template/kurl_context.go, especially GetKurlValues and NewKurlContext. Run make test on a fresh macOS checkout and identify the configuration or test setup causing the missing "gcp" Auth Provider; done means the tests no longer panic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100