-
Notifications
You must be signed in to change notification settings - Fork 1k
Reduce unnecessary watch events in execution-status-controller #6849
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
base: master
Are you sure you want to change the base?
Reduce unnecessary watch events in execution-status-controller #6849
Conversation
Summary of ChangesHello @rohan-019, 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 significantly refines how 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
|
8a557bd to
353d72a
Compare
|
[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 |
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 aims to reduce unnecessary reconciliations for Work resources by introducing a more specific event predicate. The new buildWorkEventPredicate correctly triggers on generation changes and initial deletion timestamping, while ignoring final delete events, which is a good optimization. The addition of unit tests for this new predicate is also a great practice.
My main feedback is a critical correction in execution_controller.go where the custom and default predicates are combined. The current implementation uses an AND logic, which could allow a custom predicate to block the essential deletion logic. I've suggested using predicate.Or to ensure the controller's finalizer logic is always triggered as intended. I also noticed a small, unrelated but correct fix in the scheduler's spread constraint logic.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6849 +/- ##
==========================================
- Coverage 45.74% 45.64% -0.11%
==========================================
Files 689 692 +3
Lines 57161 57706 +545
==========================================
+ Hits 26149 26339 +190
- Misses 29383 29722 +339
- Partials 1629 1645 +16
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 @XiShanYongYe-Chang, I hope you are doing well |
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~
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~
pkg/controllers/execution/execution_controller_predicate_test.go
Outdated
Show resolved
Hide resolved
|
Thanks @rohan-019 LGTM |
Signed-off-by: rohan-019 <[email protected]>
8a32131 to
5782ed9
Compare
|
Thanks @rohan-019 I'm sorry for the delay in response. |
Description:
Stop enqueueing final DeleteEvents for Work to avoid redundant reconciliations (deletion is handled via the controller’s finalizer). Add a new predicate buildWorkEventPredicate() that:
Notes:
Linked Issue:
part of #6780