Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement kmeshctl version #919

Merged
merged 4 commits into from
Oct 10, 2024
Merged

Conversation

YaoZengzeng
Copy link
Member

What type of PR is this?

/kind enhancement

What this PR does / why we need it:

Implement kmeshctl version to show version of kmeshctl or Kmesh daemon

Which issue(s) this PR fixes:
Fixes #898

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@kmesh-bot kmesh-bot added the kind/enhancement New feature or request label Sep 30, 2024
Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 53.07%. Comparing base (dc26806) to head (ef71fe9).
Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
pkg/status/status_server.go 0.00% 10 Missing ⚠️
Files with missing lines Coverage Δ
pkg/status/status_server.go 40.74% <0.00%> (-1.57%) ⬇️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 973cbc6...ef71fe9. Read the comment docs.

func RunVersion(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
v := version.Get()
fmt.Printf("%s\n", v.GitVersion)
Copy link
Contributor

Choose a reason for hiding this comment

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

since the CLI tool is built with cobra, is there a reason we shouldn't use the cobra cmd.Printf(), cmd.PrintErrf(), etc methods?

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch! I'll look into it :)

@YaoZengzeng
Copy link
Member Author

@hzxuzhonghu PTAL

kmeshctl version
# Show version info of a specific Kmesh daemon
kmesh version <kmesh-daemon-pod>`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

kmesh version ? or kmeshctl version

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch!

Signed-off-by: YaoZengzeng <[email protected]>
@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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

@YaoZengzeng
Copy link
Member Author

@hzxuzhonghu maybe this PR could get merged.

@hzxuzhonghu
Copy link
Member

@LiZhenCheng9527 Any other comments?

@YaoZengzeng
Copy link
Member Author

ping @LiZhenCheng9527

@LiZhenCheng9527
Copy link
Collaborator

/lgtm

@kmesh-bot kmesh-bot added the lgtm label Oct 10, 2024
@LiZhenCheng9527 LiZhenCheng9527 added this pull request to the merge queue Oct 10, 2024
Merged via the queue into kmesh-net:main with commit 18c383a Oct 10, 2024
9 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.

support kmeshctl version sub command
5 participants