Skip to content

Add Notation to WithClientMetrics in pkg/ddc/base/runtime.go.#5788

Merged
fluid-e2e-bot[bot] merged 1 commit intofluid-cloudnative:masterfrom
lzy117:new-branch
Apr 16, 2026
Merged

Add Notation to WithClientMetrics in pkg/ddc/base/runtime.go.#5788
fluid-e2e-bot[bot] merged 1 commit intofluid-cloudnative:masterfrom
lzy117:new-branch

Conversation

@lzy117
Copy link
Copy Markdown
Contributor

@lzy117 lzy117 commented Apr 12, 2026

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

Signed-off-by: lzy117 <3305856829@qq.com>
@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot bot commented Apr 12, 2026

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

@sonarqubecloud
Copy link
Copy Markdown

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

Comment thread pkg/ddc/base/runtime.go
Comment on lines +238 to +247
// 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.
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 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.

Copy link
Copy Markdown
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

文档注释添加清晰完整,含参数和返回值说明。LGTM。

@fluid-e2e-bot
Copy link
Copy Markdown

fluid-e2e-bot bot commented Apr 16, 2026

[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

@fluid-e2e-bot fluid-e2e-bot bot merged commit 1f40c04 into fluid-cloudnative:master Apr 16, 2026
4 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 Notation to WithClientMetrics in pkg/ddc/base/runtime.go.

2 participants