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

Add arch type to the output of the plugin info cmd #118

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

marckhouzam
Copy link
Contributor

What this PR does / why we need it

On Darwin ARM64 machines, the CLI can install plugins using either an ARM64 or an AMD64 build, depending of plugin binary availability. Showing the arch type in the output of tanzu <plugin> info will help in troubleshooting.

Which issue(s) this PR fixes

Fixes # N/A

Describe testing done for PR

Build the builder plugin for both ARM64 and AMD64 using the plugin-runtime with this PR:

$ cd tanzu-cli
$ rm -rf artifacts
$ make plugin-build
# Install the newly built builder plugin for ARM64
$ tz plugin install --local-source artifacts/plugins/darwin/arm64 builder
[i] Installing plugin 'builder:v1.1.0-dev' with target 'global'
[ok] successfully installed 'builder' plugin

# Notice the "binaryArch" info
$ tz builder info
{"name":"builder","description":"Build Tanzu components","target":"global","version":"v1.1.0-dev","buildSHA":"1283b075b-dirty","digest":"","group":"Admin","docURL":"","completionType":0,"pluginRuntimeVersion":"v1.1.0-dev.0.20231010050932-6807eb0c63cf","binaryArch":"arm64"}

# Install the newly built builder plugin for AMD64
# We need an AMD64 CLI to do that, so I installed one
$ file ~/bin/tanzu.v1.0.0
/Users/kmarc/bin/tanzu.v1.0.0: Mach-O 64-bit executable x86_64
$ ~/bin/tanzu.v1.0.0 plugin install --local-source artifacts/plugins/darwin/amd64 builder
[i] Installing plugin 'builder:v1.1.0-dev' with target 'global'
[ok] successfully installed 'builder' plugin

# Notice the "binaryArch" info
$ tz builder info
{"name":"builder","description":"Build Tanzu components","target":"global","version":"v1.1.0-dev","buildSHA":"1283b075b-dirty","digest":"","group":"Admin","docURL":"","completionType":0,"pluginRuntimeVersion":"v1.1.0-dev.0.20231010050932-6807eb0c63cf","binaryArch":"amd64"}

Release note

Display the machine architecture of the plugin binary in the output of `tanzu <plugin> info`

Additional information

Special notes for your reviewer

On Darwin ARM64 machines, the CLI can install plugins using either an
ARM64 or an AMD64 build, depending of plugin binary availability.
Showing the arch type in the output of "tanzu <plugin> info" will help
in troubleshooting.

Signed-off-by: Marc Khouzam <[email protected]>
@marckhouzam marckhouzam requested a review from a team as a code owner October 12, 2023 21:08
Copy link
Contributor

@anujc25 anujc25 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@marckhouzam marckhouzam merged commit 25879f6 into vmware-tanzu:main Oct 18, 2023
4 checks passed
@marckhouzam marckhouzam deleted the feat/showArchInInfo branch October 18, 2023 17:10
@marckhouzam marckhouzam added this to the v1.1.0 milestone Oct 20, 2023
@marckhouzam marckhouzam added the docs-impact issues with documentation impact label Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-not-required docs-impact issues with documentation impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants