Failing test in local.

57 views
Skip to first unread message

Viren Negi

unread,
Oct 2, 2020, 11:20:50 AM10/2/20
to Prometheus Users
Hello Guys, 

I'm here for a discussion around Prometheus test which is failing on my local master. 
I wanted to start with a couple of Issues and wanted to have all the test pass first so that I can be sure that none of my changes are breaking the Test Cases


go version go1.13.7 darwin/amd64

>> running all tests
GO111MODULE=on go test -race  -mod=vendor ./...
discovery/digitalocean/digitalocean_test.go:45:3: t.Cleanup undefined (type *testing.T has no field or method Cleanup)
note: module requires Go 1.14
discovery/dockerswarm/mock_test.go:58:5: m.t.Cleanup undefined (type *testing.T has no field or method Cleanup)
note: module requires Go 1.14
discovery/hetzner/mock_test.go:46:5: m.t.Cleanup undefined (type *testing.T has no field or method Cleanup)
note: module requires Go 1.14
discovery/openstack/mock_test.go:46:5: m.t.Cleanup undefined (type *testing.T has no field or method Cleanup)
note: module requires Go 1.14
tsdb/chunks/head_chunks_test.go:369:3: t.Cleanup undefined (type *testing.T has no field or method Cleanup)
note: module requires Go 1.14
tsdb/db_test.go:69:3: t.Cleanup undefined (type testing.TB has no field or method Cleanup)
tsdb/db_test.go:2739:3: t.Cleanup undefined (type *testing.T has no field or method Cleanup)
tsdb/head_test.go:54:3: t.Cleanup undefined (type testing.TB has no field or method Cleanup)
tsdb/repair_test.go:32:3: t.Cleanup undefined (type *testing.T has no field or method Cleanup)
note: module requires Go 1.14
web/web_test.go:453:3: t.Cleanup undefined (type *testing.T has no field or method Cleanup)
note: module requires Go 1.14
--- FAIL: TestWALSegmentSizeBounds (0.30s)
    main_test.go:211: panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
        panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
        panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
        panic: reflect.StructOf: StructOf does not allow unexported fields

        goroutine 1 [running]:
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/yaml.go:249 +0x104
        panic(0x3f3ab20, 0x4b57b70)
        /usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/yaml.go:249 +0x104
        panic(0x3f3ab20, 0x4b57b70)
        /usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/yaml.go:249 +0x104
        panic(0x3f3ab20, 0x4b57b70)
        /usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
        reflect.runtimeStructField(0xc000147300, 0x18, 0x3dda243, 0x27, 0x4c6dce0, 0x40653c0, 0x0, 0x0, 0x0, 0x0, ...)
        /usr/local/Cellar/go/1.13.7/libexec/src/reflect/type.go:2754 +0x1d4
        reflect.StructOf(0xc000440000, 0x18, 0x19, 0x0, 0x0)
        /usr/local/Cellar/go/1.13.7/libexec/src/reflect/type.go:2362 +0x2549
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/discovery/registry.go:103 +0x769
        github.com/prometheus/prometheus/discovery.UnmarshalYAMLWithInlineConfigs(0x4148100, 0xc000196000, 0xc000557220, 0x62a5580, 0x1041f0d)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/discovery/registry.go:121 +0xf3
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:504 +0xd6
        gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00009ca80, 0xc0004e07e0, 0xa24fc38, 0xc000196000, 0xc000196000)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:270 +0x151
        gopkg.in/yaml%2ev2.(*decoder).prepare(0xc00009ca80, 0xc0004e07e0, 0x4148100, 0xc00001a3d8, 0x196, 0x109b5a2, 0x10eee9d, 0x4148117, 0xc0005571c0)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:313 +0x1b4
        gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00009ca80, 0xc0004e07e0, 0x4148100, 0xc00001a3d8, 0x196, 0x196)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:364 +0x160
        gopkg.in/yaml%2ev2.(*decoder).sequence(0xc00009ca80, 0xc0004e0770, 0x40af980, 0xc0005fb4a8, 0x197, 0x40af980)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:609 +0x2d4
        gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00009ca80, 0xc0004e0770, 0x40af980, 0xc0005fb4a8, 0x197, 0xc0005fb4a8)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:374 +0x268
        gopkg.in/yaml%2ev2.(*decoder).mappingStruct(0xc00009ca80, 0xc0004e0690, 0x41d3040, 0xc0005fb490, 0x199, 0xc000149100)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:767 +0x6a0
        gopkg.in/yaml%2ev2.(*decoder).mapping(0xc00009ca80, 0xc0004e0690, 0x41d3040, 0xc0005fb490, 0x199, 0x41d3040)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:626 +0xe48
        gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00009ca80, 0xc0004e0690, 0x3e79b40, 0xc0005fb490, 0x16, 0xc00080f4d8)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:372 +0x2a9
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:272 +0xfa
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:415 +0x94
        gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00009ca80, 0xc0004e0690, 0xa24fbf8, 0xc0005fb490, 0xc0005fb490)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:270 +0x151
        gopkg.in/yaml%2ev2.(*decoder).prepare(0xc00009ca80, 0xc0004e0690, 0x41d2fa0, 0xc0005fb490, 0x199, 0x3f3ab01, 0xc0004867d0, 0x198, 0x62a0000)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:313 +0x1b4
        gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00009ca80, 0xc0004e0690, 0x41d2fa0, 0xc0005fb490, 0x199, 0xc0005fb490)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:364 +0x160
        gopkg.in/yaml%2ev2.(*decoder).mappingStruct(0xc00009ca80, 0xc0004e0310, 0x4365e60, 0xc0005fb450, 0x199, 0x0)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:767 +0x6a0
        gopkg.in/yaml%2ev2.(*decoder).mapping(0xc00009ca80, 0xc0004e0310, 0x4365e60, 0xc0005fb450, 0x199, 0x4365e60)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:626 +0xe48
        gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00009ca80, 0xc0004e0310, 0x3e79ac0, 0xc0005fb450, 0x16, 0x0)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:372 +0x2a9
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:272 +0xfa
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:174 +0xd4
        gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc00009ca80, 0xc0004e0310, 0xa24fb98, 0xc0005fb450, 0xc0005fb450)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:270 +0x151
        gopkg.in/yaml%2ev2.(*decoder).prepare(0xc00009ca80, 0xc0004e0310, 0x4390740, 0xc0005fb450, 0x199, 0x0, 0x0, 0x107fe10, 0x0)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:313 +0x1b4
        gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00009ca80, 0xc0004e0310, 0x4390740, 0xc0005fb450, 0x199, 0x0)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:364 +0x160
        gopkg.in/yaml%2ev2.(*decoder).document(0xc00009ca80, 0xc0004e02a0, 0x4390740, 0xc0005fb450, 0x199, 0x109b5a2)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:384 +0xed
        gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc00009ca80, 0xc0004e02a0, 0x4390740, 0xc0005fb450, 0x199, 0x199)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/decode.go:360 +0x37c
        gopkg.in/yaml%2ev2.unmarshal(0xc0000f7000, 0x39e, 0x400, 0x4148180, 0xc0005fb450, 0x401, 0x0, 0x0)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/yaml.go:148 +0x4fc
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/vendor/gopkg.in/yaml.v2/yaml.go:89
        github.com/prometheus/prometheus/config.Load(0xc0000f6c00, 0x39e, 0x39e, 0x59e, 0xc0000f6c00)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:47 +0x141
        github.com/prometheus/prometheus/config.LoadFile(0x7ffeefbff537, 0x2b, 0xc00015aaa0, 0x454a953, 0x2)
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:60 +0xb5
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/cmd/prometheus/main.go:284 +0x84ee
        /Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/cmd/prometheus/main_test.go:45 +0x29b
        main.main()
        _testmain.go:54 +0x224

    main_test.go:233:

        exp: 1

        got: 2
--- FAIL: TestStartupInterrupt (5.06s)
    main_unix_test.go:66: prometheus didn't start in the specified timeout
FAIL
--- FAIL: TestYAMLRoundtrip (0.01s)
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields

goroutine 58 [running]:
testing.tRunner.func1(0xc000158500)
/usr/local/Cellar/go/1.13.7/libexec/src/testing/testing.go:874 +0x69f
panic(0x3314f60, 0x3c2cf60)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
panic(0x3314f60, 0x3c2cf60)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
panic(0x3314f60, 0x3c2cf60)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
panic(0x3314f60, 0x3c2cf60)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
reflect.runtimeStructField(0xc00033a8c0, 0x18, 0x3225ae3, 0x27, 0x3d09680, 0x33dfdc0, 0x0, 0x0, 0x0, 0x0, ...)
/usr/local/Cellar/go/1.13.7/libexec/src/reflect/type.go:2754 +0x1d4
reflect.StructOf(0xc0002dc000, 0x17, 0x19, 0x0, 0x0)
/usr/local/Cellar/go/1.13.7/libexec/src/reflect/type.go:2362 +0x2549
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/discovery/registry.go:103 +0x769
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/discovery/registry.go:121 +0xf3
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:504 +0xd6
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc0001788a0, 0xc0002a4cb0, 0x79200c8, 0xc0001d4000, 0xc0001d4000)
gopkg.in/yaml%2ev2.(*decoder).prepare(0xc0001788a0, 0xc0002a4cb0, 0x3488460, 0xc000190288, 0x196, 0x109b1a2, 0x113426d, 0x3488477, 0xc000161960)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0001788a0, 0xc0002a4cb0, 0x3488460, 0xc000190288, 0x196, 0x196)
gopkg.in/yaml%2ev2.(*decoder).sequence(0xc0001788a0, 0xc0002a4c40, 0x34096e0, 0xc00012d718, 0x197, 0x34096e0)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0001788a0, 0xc0002a4c40, 0x34096e0, 0xc00012d718, 0x197, 0xc00012d718)
gopkg.in/yaml%2ev2.(*decoder).mappingStruct(0xc0001788a0, 0xc0002a4b60, 0x34f3a40, 0xc00012d700, 0x199, 0x100)
gopkg.in/yaml%2ev2.(*decoder).mapping(0xc0001788a0, 0xc0002a4b60, 0x34f3a40, 0xc00012d700, 0x199, 0x34f3a40)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0001788a0, 0xc0002a4b60, 0x3297b20, 0xc00012d700, 0x16, 0xc000300a48)
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:415 +0x94
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc0001788a0, 0xc0002a4b60, 0x7920088, 0xc00012d700, 0xc00012d700)
gopkg.in/yaml%2ev2.(*decoder).prepare(0xc0001788a0, 0xc0002a4b60, 0x34f39a0, 0xc00012d700, 0x199, 0x3314f01, 0xc0002d6380, 0x198, 0x4e30000)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0001788a0, 0xc0002a4b60, 0x34f39a0, 0xc00012d700, 0x199, 0xc00012d700)
gopkg.in/yaml%2ev2.(*decoder).mappingStruct(0xc0001788a0, 0xc0002a4a80, 0x35fea60, 0xc00012d6c0, 0x199, 0x0)
gopkg.in/yaml%2ev2.(*decoder).mapping(0xc0001788a0, 0xc0002a4a80, 0x35fea60, 0xc00012d6c0, 0x199, 0x35fea60)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0001788a0, 0xc0002a4a80, 0x3297aa0, 0xc00012d6c0, 0x16, 0x0)
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:174 +0xd4
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc0001788a0, 0xc0002a4a80, 0x7920068, 0xc00012d6c0, 0xc00012d6c0)
gopkg.in/yaml%2ev2.(*decoder).prepare(0xc0001788a0, 0xc0002a4a80, 0x3612640, 0xc00012d6c0, 0x199, 0x0, 0x0, 0x107fc80, 0x0)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0001788a0, 0xc0002a4a80, 0x3612640, 0xc00012d6c0, 0x199, 0x0)
gopkg.in/yaml%2ev2.(*decoder).document(0xc0001788a0, 0xc0002a4a10, 0x3612640, 0xc00012d6c0, 0x199, 0x109b1a2)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0001788a0, 0xc0002a4a10, 0x3612640, 0xc00012d6c0, 0x199, 0x199)
gopkg.in/yaml%2ev2.unmarshal(0xc000372400, 0xb2d, 0xc00, 0x34884e0, 0xc00012d6c0, 0xc01, 0x0, 0x0)
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:47 +0x141
github.com/prometheus/prometheus/config.LoadFile(0x3765d62, 0x1b, 0x3087958003f6ca48, 0x5f773b3b, 0xc0004aef28)
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:60 +0xb5
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config_test.go:722 +0x48
testing.tRunner(0xc000158500, 0x380b208)
/usr/local/Cellar/go/1.13.7/libexec/src/testing/testing.go:909 +0x19a
created by testing.(*T).Run
/usr/local/Cellar/go/1.13.7/libexec/src/testing/testing.go:960 +0x652
--- FAIL: TestReload (0.00s)
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields

goroutine 74 [running]:
testing.tRunner.func1(0xc000412200)
/usr/local/Cellar/go/1.13.7/libexec/src/testing/testing.go:874 +0x69f
panic(0x1a7ca60, 0x1cad350)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
panic(0x1a7ca60, 0x1cad350)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
panic(0x1a7ca60, 0x1cad350)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
panic(0x1a7ca60, 0x1cad350)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
reflect.runtimeStructField(0xc0002b20e0, 0x18, 0x1a3cb03, 0x27, 0x1cdf6e0, 0x1aab9a0, 0x0, 0x0, 0x0, 0x0, ...)
/usr/local/Cellar/go/1.13.7/libexec/src/reflect/type.go:2754 +0x1d4
reflect.StructOf(0xc000094380, 0x8, 0x8, 0x0, 0x0)
/usr/local/Cellar/go/1.13.7/libexec/src/reflect/type.go:2362 +0x2549
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/discovery/registry.go:103 +0x769
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/discovery/registry.go:121 +0xf3
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:504 +0xd6
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc0005520c0, 0xc00012ea10, 0x5f6d218, 0xc000452000, 0xc000452000)
gopkg.in/yaml%2ev2.(*decoder).prepare(0xc0005520c0, 0xc00012ea10, 0x1acbb80, 0xc0000ca068, 0x196, 0x109a2d2, 0x1128b8d, 0x1acbb97, 0xc0005783c0)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0005520c0, 0xc00012ea10, 0x1acbb80, 0xc0000ca068, 0x196, 0x196)
gopkg.in/yaml%2ev2.(*decoder).sequence(0xc0005520c0, 0xc00012e9a0, 0x1ab6ec0, 0xc0003c0398, 0x197, 0x1ab6ec0)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0005520c0, 0xc00012e9a0, 0x1ab6ec0, 0xc0003c0398, 0x197, 0xc0003c0398)
gopkg.in/yaml%2ev2.(*decoder).mappingStruct(0xc0005520c0, 0xc00012e8c0, 0x1ae81c0, 0xc0003c0380, 0x199, 0x0)
gopkg.in/yaml%2ev2.(*decoder).mapping(0xc0005520c0, 0xc00012e8c0, 0x1ae81c0, 0xc0003c0380, 0x199, 0x1ae81c0)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0005520c0, 0xc00012e8c0, 0x1a55d80, 0xc0003c0380, 0x16, 0xc00016c8b8)
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:415 +0x94
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc0005520c0, 0xc00012e8c0, 0x5f6d1d8, 0xc0003c0380, 0xc0003c0380)
gopkg.in/yaml%2ev2.(*decoder).prepare(0xc0005520c0, 0xc00012e8c0, 0x1ae8120, 0xc0003c0380, 0x199, 0x1a7ca01, 0xc000376180, 0x198, 0xc000040000)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0005520c0, 0xc00012e8c0, 0x1ae8120, 0xc0003c0380, 0x199, 0xc0003c0380)
gopkg.in/yaml%2ev2.(*decoder).mappingStruct(0xc0005520c0, 0xc00012e7e0, 0x1b31080, 0xc0003c0340, 0x199, 0xc00040c080)
gopkg.in/yaml%2ev2.(*decoder).mapping(0xc0005520c0, 0xc00012e7e0, 0x1b31080, 0xc0003c0340, 0x199, 0x1b31080)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0005520c0, 0xc00012e7e0, 0x1a55d00, 0xc0003c0340, 0x16, 0x0)
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:174 +0xd4
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc0005520c0, 0xc00012e7e0, 0x5f6d1b8, 0xc0003c0340, 0xc0003c0340)
gopkg.in/yaml%2ev2.(*decoder).prepare(0xc0005520c0, 0xc00012e7e0, 0x1b37c80, 0xc0003c0340, 0x199, 0x0, 0x0, 0x107f080, 0x0)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0005520c0, 0xc00012e7e0, 0x1b37c80, 0xc0003c0340, 0x199, 0x0)
gopkg.in/yaml%2ev2.(*decoder).document(0xc0005520c0, 0xc00012e700, 0x1b37c80, 0xc0003c0340, 0x199, 0x109a2d2)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0005520c0, 0xc00012e700, 0x1b37c80, 0xc0003c0340, 0x199, 0x199)
gopkg.in/yaml%2ev2.unmarshal(0xc000568120, 0x30, 0x30, 0x1acbc00, 0xc0003c0340, 0x1, 0x0, 0x0)
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/notifier/notifier_test.go:469 +0x330
testing.tRunner(0xc000412200, 0x1bbdd18)
/usr/local/Cellar/go/1.13.7/libexec/src/testing/testing.go:909 +0x19a
created by testing.(*T).Run
/usr/local/Cellar/go/1.13.7/libexec/src/testing/testing.go:960 +0x652
--- FAIL: TestManagerApplyConfig (0.00s)
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields [recovered]
panic: reflect.StructOf: StructOf does not allow unexported fields

goroutine 33 [running]:
testing.tRunner.func1(0xc000168700)
/usr/local/Cellar/go/1.13.7/libexec/src/testing/testing.go:874 +0x69f
panic(0x1a356a0, 0x1c67440)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
panic(0x1a356a0, 0x1c67440)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
panic(0x1a356a0, 0x1c67440)
/usr/local/Cellar/go/1.13.7/libexec/src/runtime/panic.go:679 +0x1b2
reflect.runtimeStructField(0xc0000f1040, 0x18, 0x19f5763, 0x27, 0x1c99920, 0x1a621e0, 0x0, 0x0, 0x0, 0x0, ...)
/usr/local/Cellar/go/1.13.7/libexec/src/reflect/type.go:2754 +0x1d4
reflect.StructOf(0xc00022e700, 0xf, 0x11, 0x0, 0x0)
/usr/local/Cellar/go/1.13.7/libexec/src/reflect/type.go:2362 +0x2549
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/discovery/registry.go:103 +0x769
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/discovery/registry.go:121 +0xf3
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:356 +0xd6
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc0000b52c0, 0xc0001e4d20, 0x3ba1bd8, 0xc0000d50e0, 0xc0000d50e0)
gopkg.in/yaml%2ev2.(*decoder).prepare(0xc0000b52c0, 0xc0001e4d20, 0x1a80d20, 0xc0000b2290, 0x196, 0x109a242, 0x10ea97d, 0x1a80d37, 0xc0002461c0)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0000b52c0, 0xc0001e4d20, 0x1a80d20, 0xc0000b2290, 0x196, 0x196)
gopkg.in/yaml%2ev2.(*decoder).sequence(0xc0000b52c0, 0xc0001e4cb0, 0x1a22ee0, 0xc0002428a8, 0x197, 0x1a22ee0)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0000b52c0, 0xc0001e4cb0, 0x1a22ee0, 0xc0002428a8, 0x197, 0xc0002428a8)
gopkg.in/yaml%2ev2.(*decoder).mappingStruct(0xc0000b52c0, 0xc0001e4bd0, 0x1aea760, 0xc000242820, 0x199, 0x0)
gopkg.in/yaml%2ev2.(*decoder).mapping(0xc0000b52c0, 0xc0001e4bd0, 0x1aea760, 0xc000242820, 0x199, 0x1aea760)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0000b52c0, 0xc0001e4bd0, 0x1a0e040, 0xc000242820, 0x16, 0x0)
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/config/config.go:174 +0xd4
gopkg.in/yaml%2ev2.(*decoder).callUnmarshaler(0xc0000b52c0, 0xc0001e4bd0, 0x3ba1bb8, 0xc000242820, 0xc000242820)
gopkg.in/yaml%2ev2.(*decoder).prepare(0xc0000b52c0, 0xc0001e4bd0, 0x1af0560, 0xc000242820, 0x199, 0x0, 0x0, 0x107f0a0, 0x0)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0000b52c0, 0xc0001e4bd0, 0x1af0560, 0xc000242820, 0x199, 0x0)
gopkg.in/yaml%2ev2.(*decoder).document(0xc0000b52c0, 0xc0001e4b60, 0x1af0560, 0xc000242820, 0x199, 0x109a242)
gopkg.in/yaml%2ev2.(*decoder).unmarshal(0xc0000b52c0, 0xc0001e4b60, 0x1af0560, 0xc000242820, 0x199, 0x199)
gopkg.in/yaml%2ev2.unmarshal(0xc000082420, 0x51, 0x60, 0x1a80c20, 0xc000242820, 0x1, 0x0, 0x0)
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/scrape/manager_test.go:229 +0xfb
/Users/admin/Documents/goProject/src/github.com/prometheus/prometheus/scrape/manager_test.go:269 +0x69
testing.tRunner(0xc000168700, 0x1b75db0)
/usr/local/Cellar/go/1.13.7/libexec/src/testing/testing.go:909 +0x19a
created by testing.(*T).Run
/usr/local/Cellar/go/1.13.7/libexec/src/testing/testing.go:960 +0x652
ok  github.com/prometheus/prometheus/tsdb/test (cached) [no tests to run]
FAIL
make: *** [common-test] Error 2

Brian Candler

unread,
Oct 2, 2020, 11:25:28 AM10/2/20
to Prometheus Users
On Friday, 2 October 2020 16:20:50 UTC+1, Viren Negi wrote: 
go version go1.13.7 darwin/amd64
...
>> running all tests
GO111MODULE=on go test -race  -mod=vendor ./...
discovery/digitalocean/digitalocean_test.go:45:3: t.Cleanup undefined (type *testing.T has no field or method Cleanup)
note: module requires Go 1.14

I think there is a very strong clue in that message :-)

Harkishen Singh

unread,
Oct 4, 2020, 1:57:17 PM10/4/20
to Prometheus Users
Update your go version to the latest and try it again. Prometheus' CI uses go version 1.15. Maybe, that can work out for you.
Reply all
Reply to author
Forward
0 new messages