Closed karlkfi closed 3 weeks ago
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: nan-yu
The full list of commands accepted by this bot can be found here.
The pull request process is described here
TestRoot_SourceReconcilerErrorsMetricValidation is flaky?
--- FAIL: TestRoot_SourceReconcilerErrorsMetricValidation/single_reconciler_error_in_source_component (0.01s)
panic: runtime error: index out of range [3] with length 3 [recovered]
panic: runtime error: index out of range [3] with length 3
goroutine 677 [running]:
testing.tRunner.func1.2({0x1dbe640, 0xc0014b5560})
/usr/local/go/src/testing/testing.go:1545 +0x238
testing.tRunner.func1()
/usr/local/go/src/testing/testing.go:1548 +0x397
panic({0x1dbe640?, 0xc0014b5560?})
/usr/local/go/src/runtime/panic.go:914 +0x21f
kpt.dev/configsync/pkg/testing/testmetrics.diff({0xc0010f5a40, 0x6, 0x6}, {0xc0010bc930, 0x3, 0x3})
/go/src/kpt.dev/configsync/pkg/testing/testmetrics/testexporter.go:63 +0xa90
kpt.dev/configsync/pkg/testing/testmetrics.(*TestExporter).ValidateMetrics(0xc0010bc9c0, 0x7a2170d4f5c0?, {0xc0010bc930, 0x3, 0x3})
/go/src/kpt.dev/configsync/pkg/testing/testmetrics/testexporter.go:48 +0x1c5
kpt.dev/configsync/pkg/parse.TestRoot_SourceReconcilerErrorsMetricValidation.func1(0xc00109c680)
/go/src/kpt.dev/configsync/pkg/parse/root_test.go:1045 +0x706
testing.tRunner(0xc00109c680, 0xc0011c38b0)
/usr/local/go/src/testing/testing.go:1595 +0xff
created by testing.(*T).Run in goroutine 676
/usr/local/go/src/testing/testing.go:1648 +0x3ad
https://github.com/GoogleContainerTools/kpt-config-sync/pull/1260 may fix the panic but maybe not the flaky failure...
/lgtm
/retest
Mutexes do not need a pointer when used as a field in a struct that is used with a pointer. Mutexes also don't need initialization when not a pointer. So this makes it a little easier to construct pointer.Options.