-
Notifications
You must be signed in to change notification settings - Fork 333
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
feat(kumactl) print control plane version with version cmd #2834
feat(kumactl) print control plane version with version cmd #2834
Conversation
Signed-off-by: Michael Beaumont <mjboamail@gmail.com>
40a26a6
to
0021107
Compare
Codecov Report
@@ Coverage Diff @@
## master #2834 +/- ##
==========================================
+ Coverage 52.01% 52.08% +0.07%
==========================================
Files 882 883 +1
Lines 51321 51350 +29
==========================================
+ Hits 26694 26747 +53
+ Misses 22514 22474 -40
- Partials 2113 2129 +16
Continue to review full report at Codecov.
|
app/kumactl/cmd/version/version.go
Outdated
} | ||
|
||
if kumaCPInfo != nil { | ||
cmd.Printf("kuma-cp: %s\n", kumaCPInfo.Version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably include the product as well, so the user knows if they are using Kuma kumactl with Kong Mesh kuma-cp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about
Client: Kuma 1.2.3
Server: Kuma 1.2.4
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, and if the server is kong mesh -
Client: Kuma 1.2.3
Server: Kong Mesh 1.4.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, contingent on the minor change requested.
@michaelbeaumont Pretty sure that this change is OK for the 1.3 release branch, in which case, apply the |
@@ -111,7 +111,7 @@ func NewRootCmd(root *kumactl_cmd.RootContext) *cobra.Command { | |||
cmd.AddCommand(inspect.NewInspectCmd(root)) | |||
cmd.AddCommand(install.NewInstallCmd(root)) | |||
cmd.AddCommand(uninstall.NewUninstallCmd()) | |||
cmd.AddCommand(version.NewVersionCmd()) | |||
cmd.AddCommand(version.NewCmd(root)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we gonna have 2 version
command: github.com/kumahq/kuma/app/kumactl/cmd/version
and github.com/kumahq/kuma/pkg/cmd/version
? Maybe we can create method BuildInfo.Print
, to have this formatting in one place:
cmd.Println(fmt.Sprintf("Product: %s", kuma_version.Product))
cmd.Println(fmt.Sprintf("Version: %s", buildInfo.Version))
cmd.Println(fmt.Sprintf("Git Tag: %s", buildInfo.GitTag))
cmd.Println(fmt.Sprintf("Git Commit: %s", buildInfo.GitCommit))
cmd.Println(fmt.Sprintf("Build Date: %s", buildInfo.BuildDate))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
a62bb1e
to
f57fe2f
Compare
Signed-off-by: Michael Beaumont <mjboamail@gmail.com>
Signed-off-by: Michael Beaumont <mjboamail@gmail.com>
f57fe2f
to
a9377d8
Compare
* feat(kumactl) print control plane version with version cmd Signed-off-by: Michael Beaumont <mjboamail@gmail.com> * feat(kumactl) display server product and add Client/Server prefix Signed-off-by: Michael Beaumont <mjboamail@gmail.com> * refactor(kumactl) deduplicate version printing code Signed-off-by: Michael Beaumont <mjboamail@gmail.com> (cherry picked from commit df0b186)
* feat(kumactl) print control plane version with version cmd Signed-off-by: Michael Beaumont <mjboamail@gmail.com> * feat(kumactl) display server product and add Client/Server prefix Signed-off-by: Michael Beaumont <mjboamail@gmail.com> * refactor(kumactl) deduplicate version printing code Signed-off-by: Michael Beaumont <mjboamail@gmail.com> Signed-off-by: Mike <mjboamail@gmail.com> (cherry picked from commit df0b186)
…2850) * feat(kumactl) print control plane version with version cmd Signed-off-by: Michael Beaumont <mjboamail@gmail.com> * feat(kumactl) display server product and add Client/Server prefix Signed-off-by: Michael Beaumont <mjboamail@gmail.com> * refactor(kumactl) deduplicate version printing code Signed-off-by: Michael Beaumont <mjboamail@gmail.com> Signed-off-by: Mike <mjboamail@gmail.com> (cherry picked from commit df0b186) Co-authored-by: Mike <mjboamail@gmail.com>
Summary
The
version
subcommand now prints the control plane version.Full changelog
version
command outputTesting
Backwards compatibility
backport-to-stable
label if the code is backwards compatible. Otherwise, list breaking changes.