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

monitor_utils.k8s: Prevent infinite looping when discovering k8s Custom Resources #999

Closed
wants to merge 1 commit into from

Conversation

xdvpser
Copy link
Contributor

@xdvpser xdvpser commented Sep 23, 2022

Resolves #998

@Kami Kami added this to the v2.1.37 milestone Oct 4, 2022
@Kami Kami self-requested a review October 4, 2022 07:20
@Kami
Copy link
Contributor

Kami commented Oct 4, 2022

@xdvpser Thanks for the contribution.

Did you eventually manage to confirm that the bug indeed lies in that piece of code or that's just one of the suspects?

I'm also looking at adding a test case for it, but it looks like adding an end to end tests will be hard so we may need to live with a mock based unit test in the short term.

@xdvpser
Copy link
Contributor Author

xdvpser commented Oct 4, 2022

Did you eventually manage to confirm that the bug indeed lies in that piece of code or that's just one of the suspects?

@Kami Hi! Yes, after applying changes in this PR, building and deploying to our servers, it started working properly.

@Kami
Copy link
Contributor

Kami commented Oct 4, 2022

@xdvpser Thanks for confirming. I added basic mock based unit tests in #1004.

Kami pushed a commit that referenced this pull request Oct 4, 2022
* monitor_utils.k8s: Prevent infinite looping when discovering k8s Custom Resources

* Add basic mock based unit tests for handling of controller info based
edge cases in PodProcessor class.

* Update log message.

* Add changelog entry.

* Remove specialized Docker image build which is not needed anymore.

Co-authored-by: Nurbek Turdaliev <[email protected]>
@Kami
Copy link
Contributor

Kami commented Oct 4, 2022

Merged into master via #1004 - thanks!

New dev build of Docker image with those changes should be available shortly (after CI finishes).

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.

BUG: agent stuck in an infinite loop, while trying to discover K8S custom resources
2 participants