fix: propagate context through dataflow affinity job paths#5880
Conversation
Signed-off-by: CAICAIIs <3360776475@qq.com>
|
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% 63.31% +1.66%
==========================================
Files 480 481 +1
Lines 32613 33113 +500
==========================================
+ Hits 20108 20967 +859
+ Misses 10897 10473 -424
- Partials 1608 1673 +65 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
|
Looks good overall. Context propagation is complete through the entire |
Signed-off-by: CAICAIIs <3360776475@qq.com>
|
cheyang
left a comment
There was a problem hiding this comment.
All CI checks passed and maintainer has approved. Auto-approving to satisfy branch protection.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cheyang The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



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