kots icon indicating copy to clipboard operation
kots copied to clipboard

"make test" fails on fresh macOS checkout with panic

Open dexhorthy opened this issue 5 years ago • 2 comments

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/[email protected]/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...

dexhorthy avatar May 02 '20 15:05 dexhorthy

@laverya something you wanna take a look at on monday?

dexhorthy avatar May 02 '20 15:05 dexhorthy

@dexhorthy is your current context step to a GKE cluster?

Something seems wrong if the tests are connecting to a real cluster. This is missing the _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" // required for GKE import statement.

We will take a look to figure it out

marccampbell avatar May 04 '20 01:05 marccampbell