Plugin installation UX update#703
Conversation
1970cdc to
38c406f
Compare
marckhouzam
left a comment
There was a problem hiding this comment.
Thanks!
When installing from a group, the logic uses a different spinner for each plugin. However, each spinner, when closed, adds an empty line to the output. That does not look good:
tz plugin install --group vmware-tkg/default <gke_dev-adhol>
[i] The following plugins will be installed from plugin group 'vmware-tkg/default:v2.5.0'
NAME TARGET VERSION
isolated-cluster global v0.32.1
management-cluster kubernetes v0.32.1
package kubernetes v0.32.1
pinniped-auth global v0.32.1
secret kubernetes v0.32.0
telemetry kubernetes v0.32.1
[ok] successfully installed all plugins from group 'vmware-tkg/default:v2.5.0'
It becomes even worse when creating a TMC context which install 24 plugins, and therefore adds 24 empty lines to the output.
a) We can either fix the spinner API to allow turning off the extra empty line. We had discussed this before.
b) Or we could use the same spinner and just change its text. Maybe a global spinner can be defined instead of a local one?
Its been fixed, can you use the vmware-tanzu/tanzu-plugin-runtime#170 runtime changes along with this PR. |
c02e431 to
19cd85b
Compare
58999db to
f7a024f
Compare
186acd5 to
9ff9639
Compare
9ff9639 to
704b240
Compare
|
I noticed that we are starting count from In the testing done section, when installing specific plugins I see This doesn't look right to me. It should be |
marckhouzam
left a comment
There was a problem hiding this comment.
tanzu plugin upgrade needs to be handled:
$ tz plugin upgrade secret
| [0/0] Already installed : Plugin 'secret:v0.32.1' with target 'kubernetes' [ok] successfully upgraded plugin 'secret'
399c016 to
0876913
Compare
Whats the use case? @anujc25 |
d80e419 to
748d359
Compare
|
Related to @anujc25's comment, I still see This should be @chandrareddyp I guess your idea was that the first number is the number of plugins already installed? I think it is more common that this number is the step number, so |
Yes the first number indicates no.of plugins already installed. I felt, it make sense to indicate the count of the plugin being installed! i have updated the code. Thanks. |
25a0c7b to
49a1005
Compare
PR updates the plugin installation UX, - As part of plugin installation in-progress message, it adds total plugins needs to installed and the number of plugins being installed The in-progress message will disappear once the installation completes. Next plugin in-progress will be shown. - No log messages will be showed once the plugin installation completes. - This UX applicable to below use case: plugin upgrade plugin install (target specific and local source) plugin sync context use
9a109b0 to
191a96a
Compare
What this PR does / why we need it
This PR enhances the plugin installation. After these changes, the plugin installation does not log each successful plugin installation message, but it logs the in-progress installation message. However, it does overwrite the log to display the next plugin installation in-progress message. Additionally, each plugin installation in-progress message includes the [total plugins to install / plugins being installed].
This PR impacts below use cases:
Which issue(s) this PR fixes
Fixes #
Describe testing done for PR
When its terminated (with Ctl+c)

Plugin sync completed successfully:

Context use:


When context use being terminated (Ctl+c)
Context use completed successfully:
Plugin install from local source:

tp plugin install builder --version v1.3.0-dev --local-source /Users/cpamuluri/tkg/tasks/code/cli-core2/tanzu-cli/artifacts/plugins/darwin/amd64Release note
Additional information
Special notes for your reviewer