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

controller: cache.DeletedFinalStateUnknown type tombstone #277

Merged
merged 1 commit into from
May 14, 2024

Conversation

abhinavdahiya
Copy link
Contributor

Description of changes:

OnDelete event handler can receive
https://pkg.go.dev/k8s.io/client-go/tools/cache#DeletedFinalStateUnknown in cases where delete event is missed during reconnection.

for example, observed this

created by main.startMonitor in goroutine 1
	/home/runner/work/eks-node-viewer/eks-node-viewer/cmd/eks-node-viewer/main.go:207 +0x728
panic: interface conversion: interface {} is cache.DeletedFinalStateUnknown, not *v1.Node [recovered]
	panic: interface conversion: interface {} is cache.DeletedFinalStateUnknown, not *v1.Node [recovered]
	panic: interface conversion: interface {} is cache.DeletedFinalStateUnknown, not *v1.Node

Followed similar solution to open-telemetry/opentelemetry-collector-contrib#27847

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

OnDelete event handler can receive
https://pkg.go.dev/k8s.io/client-go/tools/cache#DeletedFinalStateUnknown
in cases where delete event is missed during reconnection.

for example, observed this
```
created by main.startMonitor in goroutine 1
	/home/runner/work/eks-node-viewer/eks-node-viewer/cmd/eks-node-viewer/main.go:207 +0x728
panic: interface conversion: interface {} is cache.DeletedFinalStateUnknown, not *v1.Node [recovered]
	panic: interface conversion: interface {} is cache.DeletedFinalStateUnknown, not *v1.Node [recovered]
	panic: interface conversion: interface {} is cache.DeletedFinalStateUnknown, not *v1.Node
```

Followed similar solution to open-telemetry/opentelemetry-collector-contrib#27847
@abhinavdahiya abhinavdahiya requested a review from a team as a code owner May 8, 2024 02:21
Copy link
Contributor

@tzneal tzneal left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@tzneal tzneal merged commit 98c26f3 into awslabs:main May 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants