Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

[Draft] Adding 'pluginRuntimeVersion' to tanzu <plugin> info command output #3793

Closed
wants to merge 3 commits into from

Conversation

anujc25
Copy link
Contributor

@anujc25 anujc25 commented Oct 31, 2022

What this PR does / why we need it

This PR adds "PluginRuntimeVersion" to PluinInfo and it will be returned as part of tanzu <plugin> info command output. This version would be used by tanzu core CLI to add version validations.

Creating another PR from the branch of this repo: #3641

Which issue(s) this PR fixes

Fixes #3547

Describe testing done for PR

❯ tanzu management-cluster info
{"name":"management-cluster","description":"Kubernetes management cluster operations","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"Run","docURL":"","completionType":0,"aliases":["mc","management-clusters"],"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

❯ tanzu feature  info
{"name":"feature","description":"Operate on features and featuregates","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"Run","docURL":"","completionType":0,"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

❯ tanzu kr info
{"name":"kubernetes-release","description":"Kubernetes release operations","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"Run","docURL":"","completionType":0,"aliases":["kr","kubernetes-releases"],"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

❯ tanzu login info
{"name":"login","description":"Login to the platform","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"System","docURL":"","completionType":0,"aliases":["lo","logins"],"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

❯ tanzu package info
{"name":"package","description":"Tanzu package management","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"Run","docURL":"","completionType":0,"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

❯ tanzu pinniped-auth info
{"name":"pinniped-auth","description":"Pinniped authentication operations (usually not directly invoked)","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"Run","docURL":"","hidden":true,"completionType":0,"aliases":["pa","pinniped-auths"],"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

❯ tanzu secret info
{"name":"secret","description":"Tanzu secret management","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"Run","docURL":"","completionType":0,"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

 ❯ tanzu telemetry info
{"name":"telemetry","description":"configure cluster-wide settings for vmware tanzu telemetry","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"Run","docURL":"","completionType":0,"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

❯ tanzu builder info
{"name":"builder","description":"Build Tanzu components","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"Admin","docURL":"","completionType":0,"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

❯ tanzu codegen info
{"name":"codegen","description":"Tanzu code generation tool","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"Admin","docURL":"","completionType":0,"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

❯ tanzu test info
{"name":"test","description":"Test the CLI","version":"v0.27.0-dev","buildSHA":"74a09a79-dirty","digest":"","group":"Admin","docURL":"","completionType":0,"installationPath":"","discovery":"","scope":"","status":"","discoveredRecommendedVersion":"","pluginRuntimeVersion":"v0.27.0-dev"}

Release note

Include the plugin runtime library version with `plugin info` to determine plugin runtime version of the plugin

Additional information

Special notes for your reviewer

prkalle and others added 3 commits October 11, 2022 22:36
Signed-off-by: Prem Kumar Kalle <pkalle@vmware.com>
Signed-off-by: Prem Kumar Kalle <pkalle@vmware.com>
Update PluginRuntimeVersion to v0.28.0-dev

Signed-off-by: Anuj Chaudhari <anujc@vmware.com>
@anujc25 anujc25 requested a review from a team as a code owner October 31, 2022 17:32
@anujc25 anujc25 added the do-not-merge/hold Some fixes necessary, hold for merging label Oct 31, 2022
@anujc25 anujc25 changed the title Adding 'pluginRuntimeVersion' to tanzu <plugin> info command output [Draft] Adding 'pluginRuntimeVersion' to tanzu <plugin> info command output Oct 31, 2022
@codecov
Copy link

codecov bot commented Oct 31, 2022

Codecov Report

Merging #3793 (8f36775) into main (83f9375) will increase coverage by 1.65%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3793      +/-   ##
==========================================
+ Coverage   46.31%   47.97%   +1.65%     
==========================================
  Files         400      425      +25     
  Lines       39583    42947    +3364     
==========================================
+ Hits        18334    20604    +2270     
- Misses      19563    20614    +1051     
- Partials     1686     1729      +43     
Impacted Files Coverage Δ
cli/runtime/plugin/info.go 82.35% <100.00%> (+5.42%) ⬆️
tkg/tkgctl/compatibility.go 0.00% <0.00%> (-70.00%) ⬇️
cli/runtime/config/conversion.go 76.19% <0.00%> (-2.66%) ⬇️
cli/core/pkg/config/bom.go 86.66% <0.00%> (-0.84%) ⬇️
cli/runtime/component/prompt.go 67.46% <0.00%> (-0.77%) ⬇️
cli/core/pkg/auth/tkg/cluster_pinniped_info.go 71.13% <0.00%> (-0.59%) ⬇️
cli/core/pkg/cluster/client.go 60.81% <0.00%> (-0.27%) ⬇️
tkg/client/init.go 0.00% <0.00%> (ø)
tkg/tkgctl/init.go 0.00% <0.00%> (ø)
cli/core/pkg/cli/catalog.go 0.00% <0.00%> (ø)
... and 69 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@anujc25 anujc25 closed this Oct 31, 2022
@anujc25 anujc25 deleted the add-plugin-lib-version branch January 18, 2023 04:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-not-required do-not-merge/hold Some fixes necessary, hold for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include the plugin library version with plugin descriptor to determine library version of the plugin
3 participants