fix: propagate context through dataflow affinity job paths#5880
fix: propagate context through dataflow affinity job paths#5880CAICAIIs wants to merge 3 commits into
Conversation
Signed-off-by: CAICAIIs <3360776475@qq.com>
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @CAICAIIs. Thanks for your PR. I'm waiting for a fluid-cloudnative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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/test-infra repository. |
There was a problem hiding this comment.
Code Review
This pull request introduces WithContext variants for Kubernetes client operations (Get, Update, List) within the kubeclient utility and updates the DataOpJobReconciler to utilize these methods, effectively replacing context.TODO() with the reconciliation context. It also includes comprehensive unit tests to verify correct error handling when contexts are canceled. The review feedback suggests avoiding variable shadowing of the client package name, reducing code duplication by moving test helpers to a shared utility, and maintaining consistency by calling the client directly where wrappers do not add value.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5880 +/- ##
==========================================
- Coverage 61.65% 61.60% -0.05%
==========================================
Files 480 480
Lines 32613 32656 +43
==========================================
+ Hits 20108 20119 +11
- Misses 10897 10930 +33
+ Partials 1608 1607 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
|



What this PR does
Related to #5705.
This PR continues the context propagation work from #5705 by wiring the reconcile
context.Contextthrough DataFlowAffinity job reconciliation paths.It updates the DataFlowAffinity job controller to use context-aware kubeclient helpers when:
It also adds context-aware Job and Node helper variants while keeping the existing helper APIs as compatibility wrappers.
Why this is needed
Some DataFlowAffinity job paths still used helper functions backed by
context.TODO(), so cancellation/deadline signals from the reconciler were not propagated through all Kubernetes client calls.Tests