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

[chore][receiver/k8sclusterreceiver] Enable goleak check #30898

Closed

Conversation

crobert-1
Copy link
Member

@crobert-1 crobert-1 commented Jan 30, 2024

Description:

Enable goleak checks to ensure no goroutines are being leaked by this receiver. This is a test only change, as some calls to Shutdown were missing.

Also, as explained in #31047, internal/k8stest was leaking goroutines. This PR now fixes that issue by closing idle HTTP client connections during Shutdown. This is required due to a bug in the k8s/client-go package. The added functionality is a workaround described here.

Link to tracking Issue:
#30438
Resolves #31047

Testing:
All existing tests are passing, as well as added goleak check.

@crobert-1
Copy link
Member Author

I still believe the leak is occurring in internal/k8stest since this is the exact same failure as #30842. The current failure is occurring even though all created k8s objects are fully deleted, so I'm wondering if somehow the Create functionality is leaking goroutines that aren't cleaned up by Delete.

Closing for now until I have an opportunity to come back and investigate more.

@crobert-1 crobert-1 added Skip Changelog PRs that do not require a CHANGELOG.md entry and removed exporter/datadog Datadog components processor/k8sattributes k8s Attributes processor receiver/kubeletstats receiver/k8sobjects exporter/alertmanager cmd/configschema configschema command labels Mar 26, 2024
@crobert-1 crobert-1 closed this Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[internal/k8stest] Leaking goroutine when creating and deleting objects
1 participant