Remove unnecessary operations of "tanzu init" #282
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
The "tanzu init" command was previously required to install the TKG plugins through a "plugin sync" (when the CLI was tightly-coupled with TKG). Users would be told to call "tanzu init" after installation.
With the Independent CLI, "plugin sync" is no longer used in the same way. Instead users use "plugin install --group "; but since the group to use is dependent on the product of interest, this installation command cannot be part of a generic "tanzu init" command but has to be run manually by the user.
This commit therefore removes the "plugin sync" call from "tanzu init".
Furthermore, a empty read/write of the plugin catalog was being performed with the goal to normalize the contents of the catalog. This was added when the concept of CLI "targets" was introduced. However, the logic to handle targets has been revamped and this normalization is no longer required. It has therefore been removed.
The "tanzu init" command is now a no-op.
We have decided to keep it for two reasons:
Which issue(s) this PR fixes
Fixes # N/A
Describe testing done for PR
For months now I have been running the Independent CLI without ever calling "tanzu init".
There have been different upgrade tests performed from old CLIs to the newest version, also without running "tanzu init".
This confirms the command was not doing anything useful.
And have CI pass.
Release note
Additional information
Special notes for your reviewer