Open crobert-1 opened 3 months ago
Pinging code owners:
%s See Adding Labels via Comments if you do not have permissions to add labels yourself.
I am not sure if is related to the .dockerignore
file not found, as that error log is also shown in a successful execution:
2024/05/10 08:14:23 🐳 Creating container for image testcontainers/ryuk:0.7.0
2024/05/10 08:14:23 ✅ Container created: 8218e5e5d53c
2024/05/10 08:14:23 🐳 Starting container: 8218e5e5d53c
2024/05/10 08:14:23 ✅ Container started: 8218e5e5d53c
2024/05/10 08:14:23 🚧 Waiting for container id 8218e5e5d53c image: testcontainers/ryuk:0.7.0. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2024/05/10 08:14:23 🔔 Container is ready: 8218e5e5d53c
ERRO[0001] Tar: Can't stat file ../opentelemetry-collector-contrib/receiver/elasticsearchreceiver/testdata/integration to tar: lstat ../opentelemetry-collector-contrib/receiver/elasticsearchreceiver/testdata/integration/../opentelemetry-collector-contrib/receiver/elasticsearchreceiver/testdata/integration/.dockerignore: no such file or directory
2024/05/10 08:14:23 🐳 Creating container for image
2024/05/10 08:14:23 ✅ Container created: b6cc6dd779de
2024/05/10 08:14:23 🐳 Starting container: b6cc6dd779de
2024/05/10 08:14:24 ✅ Container started: b6cc6dd779de
2024/05/10 08:14:24 🚧 Waiting for container id b6cc6dd779de image: 909b3c36-3860-41ea-b156-43e09cd91dd0:8fbe8d00-ff1e-4e62-9e99-243bd6caa753. Waiting for: &{Port:9200 timeout:0xc000223490 PollInterval:100ms}
2024/05/10 08:14:59 🔔 Container is ready: b6cc6dd779de
2024/05/10 08:15:05 🐳 Terminating container: b6cc6dd779de
2024/05/10 08:15:06 🚫 Container terminated: b6cc6dd779de
ERRO[0045] Tar: Can't stat file ../opentelemetry-collector-contrib/receiver/elasticsearchreceiver/testdata/integration to tar: lstat ../opentelemetry-collector-contrib/receiver/elasticsearchreceiver/testdata/integration/../opentelemetry-collector-contrib/receiver/elasticsearchreceiver/testdata/integration/.dockerignore: no such file or directory
2024/05/10 08:15:10 🐳 Creating container for image
2024/05/10 08:15:10 ✅ Container created: 5fe2aa314b47
2024/05/10 08:15:10 🐳 Starting container: 5fe2aa314b47
2024/05/10 08:15:10 ✅ Container started: 5fe2aa314b47
2024/05/10 08:15:10 🚧 Waiting for container id 5fe2aa314b47 image: 39f06d00-f189-4648-bd59-ab3158d3d7e1:bd18957d-b93e-4bec-99d5-1f98c551524f. Waiting for: &{Port:9200 timeout:0xc00070c2f0 PollInterval:100ms}
2024/05/10 08:15:55 🔔 Container is ready: 5fe2aa314b47
2024/05/10 08:16:08 🐳 Terminating container: 5fe2aa314b47
2024/05/10 08:16:08 🚫 Container terminated: 5fe2aa314b47
PASS
ok github.com/open-telemetry/opentelemetry-collector-contrib/receiver/elasticsearchreceiver 106.773s
As it fails intermittently and not only for the elasticreceiver, it might be related to the testcontainers framework itself. The panic occurs due to a waitgroup wait that never exits and finally killed due to the testing timeout (internal/coreinternal/scraperinttest/scraperint.go:162 +0x40f
):
func (it *IntegrationTest) createContainers(t *testing.T) *ContainerInfo {
var wg sync.WaitGroup
ci := &ContainerInfo{
containers: make(map[string]testcontainers.Container, len(it.containerRequests)),
}
wg.Add(len(it.containerRequests))
for _, cr := range it.containerRequests {
go func(req testcontainers.ContainerRequest) {
var errs error
require.Eventuallyf(t, func() bool {
c, err := testcontainers.GenericContainer(
context.Background(),
testcontainers.GenericContainerRequest{
ContainerRequest: req,
Started: true,
})
if err != nil {
errs = multierr.Append(errs, fmt.Errorf("execute container request: %w", err))
return false
}
ci.add(req.Name, c)
return true
}, it.createContainerTimeout, time.Second, "create container timeout: %v", errs)
wg.Done()
}(cr)
}
wg.Wait()
return ci
}
require.Eventuallyf
calls t.FailNow
if the condition is not met, thus preventing relasing the waitgroup. Although I was not able to reproduce the issue in my local environment, I would suggest two modifications:
assert.Eventually
instead of require.Eventually
and propagate the error.This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
Component(s)
receiver/elasticsearch
Describe the issue you're reporting
Failing CI/CD link
It looks like the test may be looking for a
.dockerignore
file that doesn't exist, and that's what causes the timeout.Failure output: