-
Notifications
You must be signed in to change notification settings - Fork 1k
Reduce unnecessary watch events and bindingSpec change in the binding controller #6786
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
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary of ChangesHello @XiShanYongYe-Chang, 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 aims to enhance the efficiency of the binding controllers by significantly reducing the number of unnecessary watch events that trigger reconciliation. By introducing a custom predicate, the controllers will now only process updates to Highlights
Using Gemini Code AssistThe 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 by creating a comment using either
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 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
|
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 introduces predicate functions to the binding controllers to filter out unnecessary update events, which is a great optimization to reduce controller load. The new careBindingSpecChanged
function correctly identifies most of the relevant fields in ResourceBindingSpec
. I've found a critical issue in the cluster_resource_binding_controller
and a minor bug in the comparison logic, along with a suggestion for improving maintainability. Overall, this is a valuable improvement.
Given that @rohan-019 has already submitted the PR, I plan to close the current PR at last. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6786 +/- ##
=======================================
Coverage 45.74% 45.74%
=======================================
Files 689 689
Lines 57161 57231 +70
=======================================
+ Hits 26149 26183 +34
- Misses 29383 29421 +38
+ Partials 1629 1627 -2
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:
|
8fa7dc8
to
4b8ffec
Compare
Hi @rohan-019, You can refer to this PR. |
… controller Signed-off-by: changzhen <[email protected]>
4b8ffec
to
2ca74fa
Compare
Please add some descriptions to this PR. |
@rohan-019 submitted PR #6784 to address the same subtask, and the PR is almost ready after several rounds of iterations. Let me close the current PR. |
@XiShanYongYe-Chang: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
ref #6780
Which issue(s) this PR fixes:
Part of #6780
Special notes for your reviewer:
Does this PR introduce a user-facing change?: