Skip to content

This PR is to add comments to UpdateOnUFSChange in pkg/ddc/alluxio/ufs.go. - #5797

Merged
cheyang merged 1 commit into
fluid-cloudnative:masterfrom
morpho327:new-branch
Jun 1, 2026
Merged

This PR is to add comments to UpdateOnUFSChange in pkg/ddc/alluxio/ufs.go.#5797
cheyang merged 1 commit into
fluid-cloudnative:masterfrom
morpho327:new-branch

Conversation

@morpho327

@morpho327 morpho327 commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Ⅰ. Describe what this PR does

Add notation to the UpdateOnUFSChange function in fluid/pkg/ddc/alluxio/ufs.go.

Ⅱ. Does this pull request fix one issue?

fixes #5796

III. Special notes for reviews

@fluid-e2e-bot

fluid-e2e-bot Bot commented Apr 19, 2026

Copy link
Copy Markdown

Hi @morpho327. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request adds documentation to the UpdateOnUFSChange function in the Alluxio engine. The review feedback suggests refining the documentation for the updateReady return value to improve clarity, correcting the description of when the dataset status is updated, and removing a trailing whitespace.

Comment thread pkg/ddc/alluxio/ufs.go
Comment on lines +137 to +146
// UpdateOnUFSChange handles the updates when the Underlying File System (UFS) changes.
// It checks if an update is required, sets the dataset status to Updating, and processes
// the added or removed mount points for the Alluxio engine.
//
// Parameters:
// - ufsToUpdate (*utils.UFSToUpdate): The object containing information about which UFS paths need to be updated.
//
// Returns:
// - updateReady (bool): Indicates whether the update process is ready or completed.
// - err (error): Returns an error if the status update or UFS processing fails, otherwise returns nil.

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 documentation for the return value updateReady could be more precise. Currently, it returns false when no update is required, which might be slightly confusing if interpreted as the system not being 'ready'. Additionally, the description of the function's behavior could be clarified to indicate that the status is only set to 'Updating' if an update is actually needed. There is also a trailing whitespace at the end of line 138.

Suggested change
// UpdateOnUFSChange handles the updates when the Underlying File System (UFS) changes.
// It checks if an update is required, sets the dataset status to Updating, and processes
// the added or removed mount points for the Alluxio engine.
//
// Parameters:
// - ufsToUpdate (*utils.UFSToUpdate): The object containing information about which UFS paths need to be updated.
//
// Returns:
// - updateReady (bool): Indicates whether the update process is ready or completed.
// - err (error): Returns an error if the status update or UFS processing fails, otherwise returns nil.
// UpdateOnUFSChange handles the updates when the Underlying File System (UFS) changes.
// It checks if an update is required, and if so, sets the dataset status to Updating
// and processes the added or removed mount points for the Alluxio engine.
//
// Parameters:
// - ufsToUpdate (*utils.UFSToUpdate): The object containing information about which UFS paths need to be updated.
//
// Returns:
// - updateReady (bool): Returns true if the update was successfully performed, or false if no update was needed or an error occurred.
// - err (error): Returns an error if the status update or UFS processing fails, otherwise returns nil.

@cheyang

cheyang commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

/ok-to-test

@codecov

codecov Bot commented Apr 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 62.59%. Comparing base (041354d) to head (66d4909).
⚠️ Report is 70 commits behind head on master.

Files with missing lines Patch % Lines
pkg/ddc/alluxio/ufs.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5797      +/-   ##
==========================================
+ Coverage   58.46%   62.59%   +4.13%     
==========================================
  Files         473      480       +7     
  Lines       32222    32801     +579     
==========================================
+ Hits        18839    20533    +1694     
+ Misses      11836    10633    -1203     
- Partials     1547     1635      +88     

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

@cheyang cheyang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The comment addition and new Ginkgo tests for webhook controller look good. A few observations:

  1. Comment quality — The UpdateOnUFSChange doc comment is helpful, clearly describing parameters and return values.

  2. Test refactoring — Good improvement: replacing gomonkey.ApplyFunc for env var mocking with GinkgoT().Setenv() is cleaner and more reliable.

  3. Suite package changemutating_suite_test.go changed from mutating_test to mutating package. This is correct for Ginkgo v2 (suite file should be in the same package as the tested code).

However, lint (gofmt) check is failing. Please run make fmt or gofmt -w on the changed Go files and push again:

make fmt
git add -A
git commit --amend --no-edit
git push -f

Once lint passes, I'll approve.

@cheyang

cheyang commented Apr 25, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the contribution! Before we can approve, please address two issues:

  1. Lint check is failing — run gofmt -w pkg/ddc/alluxio/ufs.go and push again
  2. Comment refinement suggestions:
    • The updateReady return value description could be more precise: it returns true when the update process has completed, not just "ready"
    • Remove trailing whitespace in the comment block

Once lint passes, we will review and approve. 🙏

@cheyang

cheyang commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

Hi @morpho327, the lint / Code fmt check failed on this PR. Comment-only changes should not trigger fmt failures — please check if gofmt needs to be applied to your changes and push a fix. Once all required checks pass, this PR can proceed to review.

Note: The kind-e2e-test (v1.33.2) also failed, but the lint failure is a non-e2e required check that needs to be resolved first.

@cheyang

cheyang commented May 1, 2026

Copy link
Copy Markdown
Collaborator

🤖 The lint check failed on this PR. Please review the lint errors and push a fix. Note: since this PR only adds comments, the lint failure may be caused by formatting issues in the added comment text (e.g., extra spaces or trailing whitespace). Once lint passes, this PR can proceed to auto-approval.

@cheyang

cheyang commented May 3, 2026

Copy link
Copy Markdown
Collaborator

🤖 The lint check is failing on this PR. Since this is a comment-only change, the lint failure is likely due to formatting issues in the added comment text. Please run make fmt or gofmt -w on the changed files and push again.

@cheyang

cheyang commented May 3, 2026

Copy link
Copy Markdown
Collaborator

⚠️ The lint required check failed for this PR. Since this is a comment-only change, please check if the failure is unrelated to your changes (e.g., a pre-existing lint issue). If so, you may need to rebase onto the latest master. If the lint failure is caused by your changes, please fix and push again.

@cheyang

cheyang commented May 10, 2026

Copy link
Copy Markdown
Collaborator

⚠️ 非 e2e check 失败 — lint check 未通过。comment-only PR 不应引入 lint 错误,请检查并修复后重新推送。

@sonarqubecloud

Copy link
Copy Markdown

@cheyang

cheyang commented May 10, 2026

Copy link
Copy Markdown
Collaborator

⚠️ DCO 检查未通过 — 此 PR 的提交缺少正确的 DCO (Developer Certificate of Origin) 签名。请在每个 commit 中添加 Signed-off-by: Your Name <your@email> 行,可通过 git commit --amend --signoff 修复后 force push。

@cheyang

cheyang commented May 13, 2026

Copy link
Copy Markdown
Collaborator

🤖 DCO Check Failed

This PR is missing a valid Signed-off-by line in the commit message. The project requires DCO (Developer Certificate of Origin) compliance.

To fix, please amend your commit:

git commit --amend -s
git push -f

This adds Signed-off-by: Your Name <your.email@example.com> to the commit message.

@cheyang

cheyang commented May 18, 2026

Copy link
Copy Markdown
Collaborator

⚠️ DCO 检查未通过 — 此 PR 的提交缺少正确的 DCO (Developer Certificate of Origin) 签名。请在每个 commit 中添加 Signed-off-by: Your Name <your@email> 行,可通过 git commit --amend --signoff 修复后 force push。

@cheyang

cheyang commented May 20, 2026

Copy link
Copy Markdown
Collaborator

🤖 This PR has been identified as comment-only (adding documentation comments to UpdateOnUFSChange). However, the DCO check is failing — the commit lacks a valid Signed-off-by line that matches the commit author.

Please amend your commit with:

git commit --amend -s
git push -f

This will add Signed-off-by: <your name> <your email> to the commit message, which is required by the project DCO policy. Once DCO passes, the automated review will proceed.

@cheyang

cheyang commented May 21, 2026

Copy link
Copy Markdown
Collaborator

⚠️ DCO check failed. Please ensure each commit has a Signed-off-by: line matching the commit author. You can fix this by amending your commit(s) with git commit --amend --signoff and force-pushing.

@cheyang

cheyang commented May 22, 2026

Copy link
Copy Markdown
Collaborator

👋 DCO check failed for this PR (action_required). Please ensure all commits include the Signed-off-by: Name <email> line. You can fix this by amending your commits with git commit --amend --signoff and force-pushing.

@cheyang

cheyang commented May 23, 2026

Copy link
Copy Markdown
Collaborator

⚠️ DCO check failed (ACTION_REQUIRED). Please ensure all commits are signed with git commit -s. See https://probot.github.io/apps/dco/ for details.

@cheyang

cheyang commented May 24, 2026

Copy link
Copy Markdown
Collaborator

⚠️ DCO check failed. Please ensure all commits have proper Signed-off-by: lines matching the commit author. You can fix this by amending your commits with git commit --amend -s or adding the sign-off to each commit individually.

@cheyang

cheyang commented May 26, 2026

Copy link
Copy Markdown
Collaborator

⚠️ DCO check failed — please ensure all commits are signed off with git commit -s. See DCO docs for details.

Signed-off-by: morpho327 <2410653591@qq.com>
@sonarqubecloud

Copy link
Copy Markdown

@cheyang

cheyang commented May 27, 2026

Copy link
Copy Markdown
Collaborator

/lgtm /approve

Comment-only PR verified: adds documentation comments to UpdateOnUFSChange in pkg/ddc/alluxio/ufs.go. All CI checks pass (DCO ✓, build ✓, lint ✓, unittest ✓, kind-e2e ✓, backward-compat ✓).

@cheyang

cheyang commented May 28, 2026

Copy link
Copy Markdown
Collaborator

/lgtm /approve

This PR is comment-only (adds documentation comments to Go source). All required checks pass, DCO passes, no blocking labels. Auto-approved by comment-only review bot.

@cheyang

cheyang commented May 28, 2026

Copy link
Copy Markdown
Collaborator

/lgtm /approve

Automated review for comment-only PR. Diff confirmed: only comments/documentation text changed. DCO ✓, all required checks ✓.

@cheyang

cheyang commented May 29, 2026

Copy link
Copy Markdown
Collaborator

/lgtm /approve

@cheyang

cheyang commented May 31, 2026

Copy link
Copy Markdown
Collaborator

/lgtm /approve

@cheyang

cheyang commented May 31, 2026

Copy link
Copy Markdown
Collaborator

/lgtm
/approve

@cheyang cheyang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, comment-only change verified.

@fluid-e2e-bot

fluid-e2e-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

[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

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

@cheyang
cheyang merged commit 488376b into fluid-cloudnative:master Jun 1, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add comments to UpdateOnUFSChange in fluid/pkg/ddc/alluxio/ufs.go

2 participants