Skip to content

Extend CacheRuntime phase 3: use advanced statefulset to support inplace update for image version changing etc.#5923

Open
xliuqq wants to merge 3 commits into
fluid-cloudnative:masterfrom
xliuqq:asts
Open

Extend CacheRuntime phase 3: use advanced statefulset to support inplace update for image version changing etc.#5923
xliuqq wants to merge 3 commits into
fluid-cloudnative:masterfrom
xliuqq:asts

Conversation

@xliuqq
Copy link
Copy Markdown
Collaborator

@xliuqq xliuqq commented May 27, 2026

Ⅰ. Describe what this PR does

  • support to modify master/workers replicas
  • support in place update for master/workers for image version and container resource

Ⅱ. Does this pull request fix one issue?

part of #5412 and fix #5878

Ⅲ. 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

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

fluid-e2e-bot Bot commented May 27, 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 ronggu for approval by writing /assign @ronggu 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 replaces the standard StatefulSet workload with AdvancedStatefulSet for managing CacheRuntime Master and Worker components, enabling in-place updates for container images and resource limits. Key changes include adding the AdvancedStatefulSet CRD, updating RBAC permissions, registering the new controller, and introducing AdvancedStatefulSetManager to handle workload reconciliation and spec synchronization. Review feedback highlights several critical issues, including potential nil pointer dereferences when accessing Spec.Replicas in AdvancedStatefulSetManager, and an inefficient in-memory pod filtering logic in runtime.go that should be replaced with server-side filtering. Additionally, it is recommended to use context.Background() instead of context.TODO().

Comment thread pkg/ddc/cache/component/advanced_statefulset_manager.go Outdated
Comment thread pkg/ddc/cache/component/advanced_statefulset_manager.go Outdated
Comment thread pkg/ddc/cache/component/advanced_statefulset_manager.go Outdated
Comment thread pkg/ddc/cache/engine/runtime.go Outdated
Comment thread pkg/ddc/cache/component/advanced_statefulset_manager.go
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

❌ Patch coverage is 83.64312% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.45%. Comparing base (28b7b87) to head (4f30b04).

Files with missing lines Patch % Lines
...dc/cache/component/advanced_statefulset_manager.go 87.93% 19 Missing and 5 partials ⚠️
pkg/ddc/cache/engine/sync.go 72.50% 8 Missing and 3 partials ⚠️
cmd/cache/app/cache.go 0.00% 7 Missing ⚠️
pkg/ddc/cache/component/daemonset_manager.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5923      +/-   ##
==========================================
+ Coverage   63.35%   63.45%   +0.09%     
==========================================
  Files         481      481              
  Lines       33070    33219     +149     
==========================================
+ Hits        20953    21080     +127     
- Misses      10442    10461      +19     
- Partials     1675     1678       +3     

☔ 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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] Support inplace update when changing runtime image version

2 participants