Skip to content

This PR is to add comments to Ready in pkg/ddc/efc/operations/base.go.#5812

Open
lulaiao wants to merge 1 commit intofluid-cloudnative:masterfrom
lulaiao:add-comments-ready-efc
Open

This PR is to add comments to Ready in pkg/ddc/efc/operations/base.go.#5812
lulaiao wants to merge 1 commit intofluid-cloudnative:masterfrom
lulaiao:add-comments-ready-efc

Conversation

@lulaiao
Copy link
Copy Markdown

@lulaiao lulaiao commented Apr 27, 2026

I. Describe what this PR does

This PR adds comments to the Ready function in pkg/ddc/efc/operations/base.go.

II. Does this pull request fix one issue?

fixes #5811

III. Special notes for reviews

None.

@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented Apr 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

@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot Bot commented Apr 27, 2026

Hi @lulaiao. 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.

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 adds documentation to the Ready function in pkg/ddc/efc/operations/base.go. The review feedback identifies a critical issue where the command execution will fail because the pipe symbol is treated as a literal argument rather than a shell operator. Additionally, it is suggested to lower the logging level for expected 'not ready' states to prevent log noise during normal polling operations.

}

// Ready checks whether the EFC mount type exists in the current runtime environment.
// It executes a mount command to search for the EFC mount type. If the command
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.

high

The comment describes executing a mount command with a pipe (|) to search for the EFC mount type. However, the implementation of the command on line 85 ([]string{"mount", "|", "grep", common.EFCMountType}) will not work as intended because the exec method (which wraps kubectl exec) does not invoke a shell by default. The pipe symbol will be treated as a literal argument to the mount command, causing it to fail. To fix this, the command should be executed via a shell, for example: []string{"sh", "-c", "mount | grep " + common.EFCMountType}.


// Ready checks whether the EFC mount type exists in the current runtime environment.
// It executes a mount command to search for the EFC mount type. If the command
// fails, it logs the error and returns false; otherwise, it returns true.
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 notes that an error is logged if the command fails. In the current implementation (line 92), this is logged at the Error level. Since Ready() is typically used for polling readiness, a 'not ready' state (where grep returns a non-zero exit code) is an expected condition rather than an exceptional error. Logging this at the Error level may result in excessive log noise during normal operation. Consider using a lower log level for the 'not ready' case and only logging at the Error level for actual execution failures (e.g., pod connection issues).

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.17%. Comparing base (c6d1c22) to head (4a1a868).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5812   +/-   ##
=======================================
  Coverage   58.17%   58.17%           
=======================================
  Files         478      478           
  Lines       32477    32477           
=======================================
  Hits        18894    18894           
  Misses      12040    12040           
  Partials     1543     1543           

☔ 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
Copy link
Copy Markdown
Collaborator

cheyang commented Apr 28, 2026

/ok-to-test

@cheyang
Copy link
Copy Markdown
Collaborator

cheyang commented Apr 28, 2026

Thanks for the contribution. The DCO check did not pass.
Please sign off your commit(s) and push the updated commit history.
You can usually do this by using git commit --amend -s (or rebasing with sign-off for multiple commits), then force-pushing the branch.

@cheyang
Copy link
Copy Markdown
Collaborator

cheyang commented Apr 28, 2026

E2E checks failed and look retryable. Retrying the test run once.

@lulaiao lulaiao force-pushed the add-comments-ready-efc branch from f2692a9 to 4a1a868 Compare April 28, 2026 11:01
@sonarqubecloud
Copy link
Copy Markdown

Signed-off-by: lulaiao <2793256357@qq.com>
@cheyang
Copy link
Copy Markdown
Collaborator

cheyang commented Apr 29, 2026

/lgtm /approve

Comment-only PR: adds documentation comment to Ready() in pkg/ddc/efc/operations/base.go. No code logic changes. DCO ✓, all CI ✓ (including E2E).

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 Ready in pkg/ddc/efc/operations/base.go.

2 participants