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

Remove unnecessary operations of "tanzu init" #282

Merged
merged 1 commit into from
May 12, 2023

Conversation

marckhouzam
Copy link
Contributor

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:

  1. backwards-compatibility (some scripts and even users still call it)
  2. the command may be needed by a future feature so we wanted to avoid removing it to re-introduce it some time later.

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

The "tanzu init" command is now a no-op but is kept for possible future use.

Additional information

Special notes for your reviewer

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 <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:
1- backwards-compatibility (some scripts and even users still call it)
2- the command may be needed by a future feature so we wanted to avoid
     removing it to re-introduce it some time later.

Signed-off-by: Marc Khouzam <kmarc@vmware.com>
@marckhouzam marckhouzam requested a review from a team as a code owner May 12, 2023 12:39
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

@marckhouzam marckhouzam merged commit 36c3849 into vmware-tanzu:main May 12, 2023
@marckhouzam marckhouzam deleted the fix/tanzuInit branch May 12, 2023 18:48
vuil pushed a commit to vuil/tanzu-cli that referenced this pull request May 16, 2023
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 <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:
1- backwards-compatibility (some scripts and even users still call it)
2- the command may be needed by a future feature so we wanted to avoid
     removing it to re-introduce it some time later.

Signed-off-by: Marc Khouzam <kmarc@vmware.com>
@marckhouzam marckhouzam added this to the v0.90.0 milestone Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants