Open mauri870 opened 2 weeks ago
Pinging code owners:
exporter/elasticsearch: @JaredTan95 @carsonip @lahsivjar
See Adding Labels via Comments if you do not have permissions to add labels yourself.
As of now there are two leaks that are detected, following the goleak docs I was able to pinpoint the exact tests that have leaks:
$ export GOTOOLCHAIN=go1.23.1
$ export GOSUMDB=sum.golang.org
$ cd exporter/elasticsearchexporter
$ go test -c -o tests; for test in $(go test -list . | grep -E "^(Test|Example)"); do ./tests -test.run "^$test\$" &>/dev/null && echo -n "." || echo -e "\n$test failed"; done
.......................
TestComponentLifecycle failed
................%
I was unable to fix this particular test, but commenting it reports TestExporterMetrics
instead, which I fixed at https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/35639. After that no more leaks are reported.
I would appreciate it if someone could take a look at TestComponentLifecycle
.
/label -needs-triage
Turns out TestExporterMetrics
was being reported because of a flaky assertion. We should probably fix TestComponentLifecycle
first and make sure all the other tests are not being reported by goleak.
I have found another leak of unclosed bulk indexer, fixing in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/35865/commits/210306ef6885f6f4fb88b3b31f759397acfae2fb as part of #35865
Component(s)
exporter/elasticsearch
Describe the issue you're reporting
Description
The goleak tool reports goroutine leaks in tests.
Steps to Reproduce
Expected Result
No leaks reported by goleak.
Actual Result
Related issues