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] fix exhaustive lint for attribute processor #23942

Conversation

fatsheep9146
Copy link
Contributor

Description:
related #23266

@fatsheep9146 fatsheep9146 requested a review from a team as a code owner July 4, 2023 05:10
@fatsheep9146 fatsheep9146 added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jul 4, 2023
@github-actions github-actions bot added the processor/attributes Attributes processor label Jul 4, 2023
@djaglowski
Copy link
Member

@fatsheep9146, there is one more switch with missing cases

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Error: k8sattributesprocessor/processor.go:214:2: missing cases in switch of type pcommon.ValueType: pcommon.ValueTypeEmpty, pcommon.ValueTypeDouble, pcommon.ValueTypeBool, pcommon.ValueTypeMap, pcommon.ValueTypeSlice, pcommon.ValueTypeBytes (exhaustive)
level=info msg="File cache stats: 25 entries of total size 231.9KiB"
level=info msg="Memory: 1074 samples, avg is 254.8MB, max is 977.7MB"
level=info msg="Execution took 1m57.741780707s"
	switch val.Type() {
	^
Error: k8sattributesprocessor/internal/kube/client.go:757:3: missing cases in switch of type selection.Operator: selection.DoesNotExist, selection.DoubleEquals, selection.In, selection.NotIn, selection.Exists, selection.GreaterThan, selection.LessThan (exhaustive)
		switch f.Op {
		^
make[2]: *** [../../Makefile.Common:167: lint] Error 1

@fatsheep9146
Copy link
Contributor Author

Error: k8sattributesprocessor/processor.go:214:2: missing cases in switch of type pcommon.ValueType: pcommon.ValueTypeEmpty, pcommon.ValueTypeDouble, pcommon.ValueTypeBool, pcommon.ValueTypeMap, pcommon.ValueTypeSlice, pcommon.ValueTypeBytes (exhaustive)
level=info msg="File cache stats: 25 entries of total size 231.9KiB"
level=info msg="Memory: 1074 samples, avg is 254.8MB, max is 977.7MB"
level=info msg="Execution took 1m57.741780707s"
	switch val.Type() {
	^
Error: k8sattributesprocessor/internal/kube/client.go:757:3: missing cases in switch of type selection.Operator: selection.DoesNotExist, selection.DoubleEquals, selection.In, selection.NotIn, selection.Exists, selection.GreaterThan, selection.LessThan (exhaustive)
		switch f.Op {
		^
make[2]: *** [../../Makefile.Common:167: lint] Error 1

Solved @codeboten please help review again

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

👍🏻

@codeboten codeboten merged commit ab5a083 into open-telemetry:main Jul 6, 2023
89 checks passed
@github-actions github-actions bot added this to the next release milestone Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
processor/attributes Attributes processor Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants