-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix unreasonable informer stop behavior #6688
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
Fix unreasonable informer stop behavior #6688
Conversation
Signed-off-by: zhzhuang-zju <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @Mou887, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request addresses a critical bug where informer cache synchronization failures would lead to the incorrect shutdown of all informers for a specific cluster. This behavior adversely affected the stability and functionality of controllers, disrupting resource distribution and work status synchronization. The fix involves removing the explicit calls to stop the informer managers when a cache sync error occurs, allowing informers to continue operating even if a transient sync issue arises. This ensures that controllers can maintain their expected behavior and that the system remains robust in handling temporary cache inconsistencies.
Highlights
- Prevented premature informer shutdown: Removed calls to InformerManager.Stop or TypedInformerManager.Stop that were triggered upon cache synchronization failures.
- Ensured controller stability: This change prevents a single cache sync failure from cascading into a complete shutdown of all informers for a given cluster, thereby maintaining the operational integrity of controllers.
- Improved resource distribution and status synchronization: By keeping informers running despite transient sync errors, the system can continue to distribute resources and synchronize work statuses more reliably.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request addresses an issue where informer cache sync failures for a specific resource would incorrectly stop all informers for a given cluster. The change removes the call to InformerManager.Stop() across several controllers, ensuring that a single resource sync failure does not disrupt other controllers that depend on informers for that cluster. This improves the overall resilience and stability of the system. The changes are consistent, correct, and well-aligned with the goal of fixing the unreasonable informer stop behavior. I approve of these changes.
|
Hi @Mou887 You can directly modify the original PR without submitting a new one. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-1.12 #6688 +/- ##
================================================
+ Coverage 46.64% 46.66% +0.02%
================================================
Files 665 665
Lines 54918 54913 -5
================================================
+ Hits 25614 25627 +13
+ Misses 27670 27655 -15
+ Partials 1634 1631 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @zhzhuang-zju , In my earlier PR, I had made two commits instead of just one because I had to fix a linting issue (extra blank lines). I thought it might be cleaner to open a new PR, but I now realize that it would have been better to just update the original one. From the next cherry-picks (for 1.13 and 1.14), I will directly update the original PR as you suggested. Thank you |
|
Thanks |
XiShanYongYe-Chang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks~
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: XiShanYongYe-Chang, zhzhuang-zju The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
Add one of the following kinds:
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
This is an automated cherry-pick of #6647 onto the
release-1.12branch.It fixes the unreasonable informer stop behavior to ensure controllers work as expected.
Special notes for your reviewer:
This is the release note from PR #6647