`skupper version` does not show the version of the running cli itself
Is your feature request related to a problem? Please describe.
When running skupper version, the output will be something like this:
$ skupper version
COMPONENT VERSION
router 3.2.0
controller d0a9e61ad9dfe9abd76941c2d4b2ef7032a13f929602d81f21ede6d1f2f957d8
network-observer 2.0.0
cli 2.0.0
prometheus v4.16.0
origin-oauth-proxy v4.16.0
It lists a cli component, but that's actually the skupper-cli image, and not the version of the skupper binary just executed.
One can get its version through go version -m, but ideally it should be shown on the output of the skupper version command. In special, having cli listed on that output and not referring to the executing binary, and having no indication of the fact can be quite misleading.
$ go version -m 2.0.0-rc1/skupper | grep ldflag
build -ldflags="-X github.com/skupperproject/skupper/internal/version.Version=2.0.0-rc1"
$ go version -m 2.0.0-2/skupper | grep ldflag
build -ldflags="-X github.com/skupperproject/skupper/pkg/version.Version=2.0.0-rh-2"
Describe the solution you'd like
The command should output the version of the local cli binary. Something like this:
$ skupper version
skupper-cli 2.0.0
IMAGE VERSION
router 3.2.0
controller d0a9e61ad9dfe9abd76941c2d4b2ef7032a13f929602d81f21ede6d1f2f957d8
network-observer 2.0.0
cli 2.0.0
prometheus v4.16.0
origin-oauth-proxy v4.16.0
Note the addition of the cli version at the top and the change of COMPONENT to IMAGE on the header.
$ skupper version -o yaml
- component: skuper-cli
version: 2.0.0
- component: router
images:
- digest: exit status 1
name: registry.redhat.io/service-interconnect/skupper-router-rhel9:3.2.0
- digest: exit status 1
name: registry.redhat.io/service-interconnect/skupper-kube-adaptor-rhel9:2.0.0
version: 3.2.0
- component: controller
images:
- digest: exit status 1
name: registry.redhat.io/service-interconnect/skupper-controller-rhel9@sha256:d0a9e61ad9dfe9abd76941c2d4b2ef7032a13f929602d81f21ede6d1f2f957d8
version: d0a9e61ad9dfe9abd76941c2d4b2ef7032a13f929602d81f21ede6d1f2f957d8
- component: network-observer
images:
- digest: exit status 1
name: registry.redhat.io/service-interconnect/skupper-network-observer-rhel9:2.0.0
version: 2.0.0
- component: cli
images:
- digest: exit status 1
name: registry.redhat.io/service-interconnect/skupper-cli-rhel9:2.0.0
version: 2.0.0
- component: prometheus
images:
- digest: exit status 1
name: registry.redhat.io/openshift4/ose-prometheus-rhel9:v4.16.0
version: v4.16.0
- component: origin-oauth-proxy
images:
- digest: exit status 1
name: registry.redhat.io/openshift4/ose-oauth-proxy-rhel9:v4.16.0
version: v4.16.0
Note the addition of the first item, without an 'images' key.
The suggestions above are initial; I think they need some discussion
Describe alternatives you've considered
I've listed an alternative above (go version -m), but that's suboptimal.
Adding a flag to get only the local cli version would provide the information, but the cli image version on the standard output would still be confusing.
Additional context
Handy version information is critical for support and helps on automation, especially in testing.
@nluaces, please consider this while you look at #2019.
@pwright fyi
@hash-d I believe that the CLI version needs to be fixed, regarding changes in the output, I think we need to reflect the change in Refdog first, so an issue with this suggestion has to be created there.