fix: correct cache client status reporting#5793
fix: correct cache client status reporting#5793CAICAIIs wants to merge 12 commits intofluid-cloudnative:masterfrom
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. 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 updates the runtime status logic to incorporate the client component's readiness into the overall runtime state. Specifically, setClientComponentStatus now returns a boolean indicating readiness, and CheckAndUpdateRuntimeStatus has been updated to aggregate this value. New unit tests were also introduced to cover various readiness scenarios. Feedback suggests improving the robustness of the replica comparison by using >= instead of == and simplifying the conditional logic for determining the component phase.
|
@Syspretor @cheyang does fuse client affect the dataset binding? |
There was a problem hiding this comment.
Pull request overview
This PR tightens cache runtime readiness evaluation so that datasets are only bound once the client component is fully ready, and adds unit tests covering the corrected behavior.
Changes:
- Update cache runtime readiness logic to include client readiness (and require all client replicas ready) before considering the runtime ready.
- Adjust client component status calculation to explicitly set NotReady/PartialReady/Ready phases based on desired vs ready replicas.
- Add unit tests validating runtime readiness and setup duration behavior across client not-ready/partial-ready/ready transitions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/ddc/cache/engine/status.go | Includes client readiness in overall runtime readiness gating; updates client status phase/ready computation. |
| pkg/ddc/cache/engine/status_test.go | Adds unit tests ensuring runtime isn’t marked ready (and setup duration not set) until client is fully ready. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5793 +/- ##
==========================================
+ Coverage 58.17% 58.40% +0.22%
==========================================
Files 478 478
Lines 32485 32488 +3
==========================================
+ Hits 18899 18973 +74
+ Misses 12042 11958 -84
- Partials 1544 1557 +13 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Replying to @xliuqq's question: Fuse client should NOT affect dataset binding. The dataset should become Bound once master and worker are ready, regardless of client readiness. This means the current PR direction — gating The PR does fix real bugs in Suggested approach:
@CAICAIIs — would you like to adjust the PR accordingly? |
Thanks, this clarifies the intended semantics. I agree the current gating is wrong: client/fuse readiness must not block runtime ready or dataset binding. I’ll revise the PR so it only fixes client status reporting and test coverage, and I’ll remove |
bfc0875 to
50327b6
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
e353d3d to
c99da76
Compare
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
Signed-off-by: CAICAIIs <3360776475@qq.com>
|



Ⅰ. Describe what this PR does
This PR corrects cache runtime client status reporting.
It updates client phase handling so the client is reported as
Ready,PartialReady, orNotReadymore accurately, including the zero-desired-replica case.It also keeps runtime readiness and dataset binding based on master and worker readiness, and adds unit tests to cover the related status transitions and retry behavior.
Ⅱ. Does this pull request fix one issue?
NONE
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Added unit tests for:
Ⅳ. Describe how to verify it
Run:
go test ./pkg/ddc/cache/engineⅤ. Special notes for reviews
This PR only updates cache client status handling and related test coverage.