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

Handle DeletedFinalStateUnknown events form cache #1278

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

c-kruse
Copy link
Contributor

@c-kruse c-kruse commented Oct 10, 2023

Closes #1277

@github-actions github-actions bot added the go label Oct 10, 2023
Signed-off-by: Christian Kruse <[email protected]>
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 11, 2023
@c-kruse c-kruse marked this pull request as ready for review October 11, 2023 01:40
@c-kruse c-kruse requested a review from a team as a code owner October 11, 2023 01:40
Comment on lines +205 to +208
c.logger.Error(
"object received was DeletedFinalStateUnknown but did not contain api_v1.Pod",
zap.Any("received", obj),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

is it logged often? We would like to avoid extensive error logging if this may be expected behavior

Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand correctly, this is more of a sanity check that shouldn't trigger an error in normal situation, as by design the cache.DeletedFinalStateUnknown event should contain the object it pertains to.

Copy link
Contributor

@sumo-drosiek sumo-drosiek Oct 11, 2023

Choose a reason for hiding this comment

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

I needed to double check if this function should always get pod object and confirm that observer is run per object type

Copy link
Contributor

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this fix @c-kruse! 👏

@c-kruse c-kruse merged commit 6bc652d into main Oct 11, 2023
27 checks passed
@c-kruse c-kruse deleted the ck/k8sprocessor-DeletedFinalStateUnknown branch October 11, 2023 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation go
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[k8sprocessor] Handle resource deletion on DeletedFinalStateUnknown
3 participants