Skip to content

Extend CacheRuntime phase 2.5: transform Cache Runtime Spec into pods spec#5888

Open
xliuqq wants to merge 4 commits into
fluid-cloudnative:masterfrom
xliuqq:transform
Open

Extend CacheRuntime phase 2.5: transform Cache Runtime Spec into pods spec#5888
xliuqq wants to merge 4 commits into
fluid-cloudnative:masterfrom
xliuqq:transform

Conversation

@xliuqq
Copy link
Copy Markdown
Collaborator

@xliuqq xliuqq commented May 17, 2026

Ⅰ. Describe what this PR does

transform Cache Runtime Spec into master/worker/client pods spec

Ⅱ. Does this pull request fix one issue?

part of #5412 and fix #5877

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

unit test

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

RuntimeTieredStore for worker/client and storage for master(ha) not yet resolved

xliuqq added 3 commits May 16, 2026 10:56
Signed-off-by: xliuqq <xlzq1992@gmail.com>

fix affinity
Signed-off-by: xliuqq <xlzq1992@gmail.com>
Signed-off-by: xliuqq <xlzq1992@gmail.com>
@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented May 17, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign yangyuliufeng for approval by writing /assign @yangyuliufeng in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a 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 refactors the CacheEngine component transformation and status update logic to be more modular and efficient. It introduces lightweight status tracking using ComponentIdentity and consolidates volume and pod template transformations into shared helper functions. Additionally, it replaces hardcoded labels with constants and significantly expands test coverage. Feedback identifies a bug in worker affinity construction where existing node affinity preferences are overwritten, and a potential issue with duplicate volume names in pod specs due to incomplete tracking of previously added volumes.

Comment thread pkg/ddc/cache/engine/transform_worker.go
Comment thread pkg/ddc/cache/engine/transform_volumes.go
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

❌ Patch coverage is 79.95546% with 90 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.20%. Comparing base (ed9b7ef) to head (f4f965d).

Files with missing lines Patch % Lines
pkg/ddc/cache/engine/transform_volumes.go 61.90% 37 Missing and 3 partials ⚠️
pkg/ddc/cache/engine/transform_common.go 65.62% 22 Missing and 11 partials ⚠️
pkg/ddc/cache/component/daemonset_manager.go 37.50% 4 Missing and 1 partial ⚠️
pkg/ddc/cache/engine/setup.go 0.00% 5 Missing ⚠️
pkg/ddc/cache/engine/transform_client.go 84.21% 2 Missing and 1 partial ⚠️
pkg/ddc/cache/component/statefulset_manager.go 60.00% 2 Missing ⚠️
pkg/ddc/cache/engine/transform_worker.go 98.27% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5888      +/-   ##
==========================================
+ Coverage   61.65%   63.20%   +1.55%     
==========================================
  Files         480      481       +1     
  Lines       32613    32873     +260     
==========================================
+ Hits        20108    20779     +671     
+ Misses      10897    10435     -462     
- Partials     1608     1659      +51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: xliuqq <xlzq1992@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

@xliuqq xliuqq requested a review from cheyang May 18, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CacheRuntime] Sync cycle avoid a full value tranform computation

1 participant