Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporterhelper] Batchsender hangs generated component shutdown test #10306

Closed
carsonip opened this issue Jun 4, 2024 · 2 comments · Fixed by #10313
Closed

[exporterhelper] Batchsender hangs generated component shutdown test #10306

carsonip opened this issue Jun 4, 2024 · 2 comments · Fixed by #10313
Labels
bug Something isn't working

Comments

@carsonip
Copy link
Contributor

carsonip commented Jun 4, 2024

Describe the bug

Any exporter using exporterhelper batchsender will cause its generated_component_test.go -shutdown test to hang as Shutdown will never return if it is not started.

Control will be stuck at https://github.com/open-telemetry/opentelemetry-collector/blob/release/v0.102.x/exporter/exporterhelper/batch_sender.go#L231

@dmitryax I wonder if the generated shutdown test needs to start the exporter, or batchsender needs to handle unstarted batcher.

Steps to reproduce

Use batchsender with WithBatcher. Run generated_component_test.go

What did you expect to see?

Test passes

What did you see instead?

Test hangs

What version did you use?

v0.102.0

What config did you use?

Environment

Additional context

@atoulme
Copy link
Contributor

atoulme commented Jun 4, 2024

The shutdown test explicitly checks calling shutdown without starting first.

@carsonip
Copy link
Contributor Author

carsonip commented Jun 4, 2024

The shutdown test explicitly checks calling shutdown without starting first.

Thanks, then it is a batchsender problem. I'll put up a patch

carsonip added a commit to carsonip/opentelemetry-collector that referenced this issue Jun 4, 2024
dmitryax pushed a commit that referenced this issue Jun 4, 2024
#### Description

Fix a bug where shutdown hangs if batch_sender exporter is not started.
The bug causes generated component tests to fail as well.

#### Link to tracking issue

Fixes #10306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants