Add Notation to WithClientMetrics in pkg/ddc/base/runtime.go.#5788
Add Notation to WithClientMetrics in pkg/ddc/base/runtime.go.#5788fluid-e2e-bot[bot] merged 1 commit intofluid-cloudnative:masterfrom
Conversation
Signed-off-by: lzy117 <3305856829@qq.com>
|
Hi @lzy117. 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. |
|
There was a problem hiding this comment.
Code Review
This pull request adds a docstring to the WithClientMetrics function in pkg/ddc/base/runtime.go. The review feedback suggests formatting improvements to the new documentation, such as removing trailing whitespace and adjusting indentation to maintain consistency with the rest of the file.
| // WithClientMetrics sets the client metrics for the RuntimeInfo. | ||
| // This function returns a RuntimeInfoOption that configures how client metrics | ||
| // are collected, including setting a default scrape target if none is provided | ||
| // and parsing the scrape target string into a valid selector. | ||
| // | ||
| // Parameters: | ||
| // - clientMetrics (datav1alpha1.ClientMetrics): The client metrics configuration to be applied. | ||
| // | ||
| // Returns: | ||
| // - (RuntimeInfoOption): A function that updates the RuntimeInfo with the specified metrics configuration. |
There was a problem hiding this comment.
The added docstring has a few style issues: trailing whitespace on lines 239 and 240, inconsistent indentation for the list items in the Parameters and Returns sections (using // - instead of // - as seen on line 197), and the removal of the blank line before the docstring. It is recommended to follow the existing style in the file for consistency.
// WithClientMetrics sets the client metrics for the RuntimeInfo.
// This function returns a RuntimeInfoOption that configures how client metrics
// are collected, including setting a default scrape target if none is provided
// and parsing the scrape target string into a valid selector.
//
// Parameters:
// - clientMetrics (datav1alpha1.ClientMetrics): The client metrics configuration to be applied.
//
// Returns:
// - (RuntimeInfoOption): A function that updates the RuntimeInfo with the specified metrics configuration.
cheyang
left a comment
There was a problem hiding this comment.
/lgtm
/approve
文档注释添加清晰完整,含参数和返回值说明。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 Notation to WithClientMetrics in pkg/ddc/base/runtime.go.
Ⅱ. Does this pull request fix one issue?
fixes #5787
Ⅲ. Special notes for reviews