This PR is to add comments to GetRuntimeStatus in pkg/ddc/base/runtime.go.#5760
Conversation
Signed-off-by: 罗一逖 <luoyititi@icloud.com>
|
There was a problem hiding this comment.
Code Review
This pull request adds a detailed docstring to the GetRuntimeStatus function in pkg/ddc/base/runtime.go. The review feedback suggests updating the documentation for the runtimeType parameter to use lowercase string examples, such as "alluxio" and "jindo", to better reflect the actual values used in the system and prevent potential confusion.
| // | ||
| // Parameters: | ||
| // - client (client.Client): The Kubernetes client used to interact with the API server. | ||
| // - runtimeType (string): The type of the runtime (e.g., AlluxioRuntime, JindoRuntime, GooseFSRuntime). |
There was a problem hiding this comment.
The examples provided for runtimeType (e.g., AlluxioRuntime) are potentially misleading. In Fluid, these types are typically represented as lowercase strings (e.g., "alluxio", "jindo", "goosefs") which correspond to the values of the constants in the common package. Using the CamelCase names might lead users to pass incorrect string values.
| // - runtimeType (string): The type of the runtime (e.g., AlluxioRuntime, JindoRuntime, GooseFSRuntime). | |
| // - runtimeType (string): The type of the runtime (e.g., "alluxio", "jindo", "goosefs"). |
|
Hi @luoyiti. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5760 +/- ##
=======================================
Coverage 61.40% 61.40%
=======================================
Files 444 444
Lines 30656 30656
=======================================
Hits 18824 18824
Misses 10285 10285
Partials 1547 1547 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Non-blocking comment: the docstring looks good overall. One small tweak would make the parameter description less ambiguous: for runtimeType, examples like "alluxio", "jindo", and "goosefs" are probably clearer than "AlluxioRuntime", "JindoRuntime", and "GooseFSRuntime", since the latter read more like type names than the actual identifier values passed into this function. |
|
/lgtm |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



Ⅰ. Describe what this PR does
add comments to GetRuntimeStatus in pkg/ddc/base/runtime.go.
Ⅱ. Does this pull request fix one issue?
fixes #5759
Ⅲ. Special notes for reviews
None special notes needed