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] Remove unnecessary internal common maps package. #36390

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bogdandrutu
Copy link
Member

No description provided.

Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me, great to see code deleted.

@atoulme
Copy link
Contributor

atoulme commented Nov 15, 2024

=== FAIL: . TestReceiverWithMetadata (0.20s)
panic: assignment to entry in nil map [recovered]
	panic: assignment to entry in nil map
make[2]: *** [../../Makefile.Common:136: test-with-cover] Error 3

goroutine 482 [running]:
testing.tRunner.func1.2({0x3080120, 0x380f4e0})
	/opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1631 +0x3f7
testing.tRunner.func1()
	/opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1634 +0x6b6
panic({0x3080120?, 0x380f4e0?})
	/opt/hostedtoolcache/go/1.22.8/x64/src/runtime/panic.go:770 +0x132
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/internal/pod.GetMetadata(0xc000a4a908, 0xc000d84220, 0xc000d81100)
	/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/internal/pod/pods.go:128 +0x150

Looks like there is at least one problem CI picked up.

EDIT: looks like maps.Clone, if passed a nil map, will return a nil map: https://go.dev/play/p/t6VA4ZMC6b7

@atoulme atoulme self-requested a review November 16, 2024 00:15
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.

3 participants