vmware-tanzu / homebrew-tanzu

Homebrew tap and formulas for installing the Tanzu CLI
Apache License 2.0
7 stars 9 forks source link

TCE Install not installing `apps` CLI plugin when installing `v0.12.0-rc.2` #31

Closed karuppiah7890 closed 2 years ago

karuppiah7890 commented 2 years ago

Bug Report

I made the following changes in the formula -

 class TanzuCommunityEdition < Formula
   desc "Tanzu Community Edition"
   homepage "https://github.com/vmware-tanzu/community-edition"
-  version "v0.11.0"
+  version "v0.12.0-rc.2"
   head "https://github.com/vmware-tanzu/community-edition.git"

   if OS.mac?
     url "https://github.com/vmware-tanzu/community-edition/releases/download/#{version}/tce-darwin-amd64-#{version}.tar.gz"
-    sha256 "c1bd55cca7b618af695447d4808d3b7fac7f33592c83f2dc3c789e1e2ece57e1"
+    sha256 "371cc717fb97a3bc9dec28516232972bc2aa8c0343238bede48529a89118fbd3"
   elsif OS.linux?
     url "https://github.com/vmware-tanzu/community-edition/releases/download/#{version}/tce-linux-amd64-#{version}.tar.gz"
-    sha256 "c287e86caf995b8d84068902635be1e3ded9b8be7889b69b302da27e543ace1e"
+    sha256 "caf5d47f363d108e7ab8f38b46392e55b5d8f4ac6ddf380f312c98a59fc1d1d3"
   end

And ran

brew install --formula tanzu-community-edition.rb

And noticed this -

Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated Homebrew from 3.4.6 (589c136f4) to 3.4.7 (baceee9d2).
Updated 3 taps (homebrew/core, homebrew/cask and vmware-tanzu/carvel).
==> New Formulae
ansible-language-server                                         localtunnel
==> Updated Formulae
Updated 191 formulae.
==> New Casks
banana-cake-pop                           todesk                                    vivid
==> Updated Casks
Updated 114 casks.

==> Homebrew was updated to version 3.4.7
The changelog can be found at:
  https://github.com/Homebrew/brew/releases/tag/3.4.7
Error: Failed to load cask: tanzu-community-edition.rb
Cask 'tanzu-community-edition' is unreadable: wrong constant name #<Class:0x00007fb1c395de28>
Warning: Treating tanzu-community-edition.rb as a formula.
==> Downloading https://github.com/vmware-tanzu/community-edition/releases/download/v0.12.0-rc.2/tce-darwin-amd64-v0.12.0-rc.2
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/303802332/a9e97497-9eb7-488d
######################################################################## 100.0%
==> Thanks for installing Tanzu Community Edition!
==> The Tanzu CLI has been installed on your system
==> 

==> ******************************************************************************
==> * To initialize all plugins required by Tanzu Community Edition, an additional
==> * step is required. To complete the installation, please run the following
==> * shell script:
==> *
==> * /usr/local/Cellar/tanzu-community-edition/v0.12.0-rc.2/libexec/configure-tce.sh
==> *
==> ******************************************************************************
==> 

==> * To cleanup and remove Tanzu Community Edition from your system, run the
==> * following script:
==> /usr/local/Cellar/tanzu-community-edition/v0.12.0-rc.2/libexec/uninstall.sh
==> 

🍺  /usr/local/Cellar/tanzu-community-edition/v0.12.0-rc.2: 31 files, 1GB, built in 7 seconds
==> Running `brew cleanup tanzu-community-edition`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
homebrew-tanzu $ /usr/local/Cellar/tanzu-community-edition/v0.12.0-rc.2/libexec/configure-tce.sh
MY_DIR: /usr/local/Cellar/tanzu-community-edition/v0.12.0-rc.2/libexec
/Users/karuppiahn/Library/Application Support
Removing old plugin cache from /Users/karuppiahn/.cache/tanzu/catalog.yaml
Installing plugin 'builder:v0.11.4'
✔  successfully installed 'builder' plugin
Installing plugin 'codegen:v0.11.4'
✔  successfully installed 'codegen' plugin
Installing plugin 'cluster:v0.11.4'
✔  successfully installed 'cluster' plugin
Installing plugin 'kubernetes-release:v0.11.4'
✔  successfully installed 'kubernetes-release' plugin
Installing plugin 'login:v0.11.4'
✔  successfully installed 'login' plugin
Installing plugin 'management-cluster:v0.11.4'
✔  successfully installed 'management-cluster' plugin
Installing plugin 'package:v0.11.4'
✔  successfully installed 'package' plugin
Installing plugin 'pinniped-auth:v0.11.4'
✔  successfully installed 'pinniped-auth' plugin
Installing plugin 'secret:v0.11.4'
✔  successfully installed 'secret' plugin
Installing plugin 'conformance:v0.12.0-rc.2'
✔  successfully installed 'conformance' plugin
Installing plugin 'diagnostics:v0.12.0-rc.2'
✔  successfully installed 'diagnostics' plugin
Installing plugin 'unmanaged-cluster:v0.12.0-rc.2'
✔  successfully installed 'unmanaged-cluster' plugin
Making a backup of your Kubernetes config files into /tmp

Notice how apps CLI plugin is not being installed, this is because the plugin install was happening separately, unlike this time. apps CLI plugin also didn't show up in the tanzu CLI help command due to this and tanzu CLI also thought there is no such plugin named apps when invoking tanzu apps or tanzu apps version as the installation of that plugin didn't happen properly

Expected Behavior

Steps to Reproduce the Bug

Screenshots or additional information and context

Environment Details

Diagnostics and log bundle

dvonthenen commented 2 years ago

This should be addressed with 0.12.0 and later