Skip to content

Extend CacheRuntime phase 2 BUG FIX: ufs path empty#5833

Open
xliuqq wants to merge 1 commit intofluid-cloudnative:masterfrom
xliuqq:ufs-path
Open

Extend CacheRuntime phase 2 BUG FIX: ufs path empty#5833
xliuqq wants to merge 1 commit intofluid-cloudnative:masterfrom
xliuqq:ufs-path

Conversation

@xliuqq
Copy link
Copy Markdown
Collaborator

@xliuqq xliuqq commented May 5, 2026

Ⅰ. Describe what this PR does

use GenUFSPathInUnifiedNamespace when Dataset Mount Path field is empty.

Ⅱ. Does this pull request fix one issue?

part of #5412

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

Ⅳ. 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 5, 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 zwwhdls for approval by writing /assign @zwwhdls 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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

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 updates the UFS path generation logic in pkg/ddc/cache/engine/cm.go to use GenUFSPathInUnifiedNamespace and modifies a test configuration in test/gha-e2e/curvine/dataset.yaml by commenting out a path entry. Feedback was provided to remove a misleading comment in the Go code that incorrectly implies the path generation logic only handles empty paths, as the function itself is more robust.

Comment on lines +118 to +119
// m.Path is empty, use /{m.Name}
Path: utils.UFSPathBuilder{}.GenUFSPathInUnifiedNamespace(m),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The comment added here is slightly misleading because GenUFSPathInUnifiedNamespace handles both cases: it uses the provided path if it is absolute, and defaults to /{m.Name} otherwise. The comment implies it only handles the empty case. Since the function name is already descriptive of its purpose, the comment is redundant and could be confusing if a path is actually provided. I suggest removing it to keep the code clean.

Suggested change
// m.Path is empty, use /{m.Name}
Path: utils.UFSPathBuilder{}.GenUFSPathInUnifiedNamespace(m),
Path: utils.UFSPathBuilder{}.GenUFSPathInUnifiedNamespace(m),

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.93%. Comparing base (4fca3ab) to head (df67772).

Files with missing lines Patch % Lines
pkg/ddc/cache/engine/cm.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5833      +/-   ##
==========================================
- Coverage   58.94%   58.93%   -0.01%     
==========================================
  Files         479      479              
  Lines       32443    32444       +1     
==========================================
  Hits        19122    19122              
- Misses      11772    11773       +1     
  Partials     1549     1549              

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

@xliuqq xliuqq requested a review from cheyang May 6, 2026 02:49
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.

1 participant