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

Disable CEIP prompt for tanzu 'version', 'ceip set' and 'config set' commands #188

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

prkalle
Copy link
Contributor

@prkalle prkalle commented Apr 6, 2023

  • Disable CEIP prompt for tanzu version, 'tanzu ceip set' and 'tanzu config set'
  • Also updated the short/long description for CEIP command

What this PR does / why we need it

This PR would disable the CEIP prompt for "tanzu version", "tanzu config set" and "tanzu ceip set"

We need it for the below reasons:

  • 'tanzu version'(common first command to run),
  • 'ceip set' (not a good UX to prompt user who is trying to set the CEIP configuration)
  • 'config set' (would be a chicken and egg issue if user tries to set CEIP configuration using "tanzu config set env.TANZU_CLI_CEIP_OPT_IN_PROMPT_ANSWER yes")

Which issue(s) this PR fixes

Fixes #189

Describe testing done for PR

Tested

  1. tanzu version command
  2. tanzu config set
  3. tanzu ceip set
    All the above commands doesn't show the CEIP prompt
❯ ./bin/tanzu version
Warning, Masking commands for plugins "login" because a core command or other plugin with that name already exists.
version: v0.0.2-dev
buildDate: 2023-04-06
sha: 83540128-dirty

❯ ./bin/tanzu config set env.TANZU_CLI_CEIP_OPT_IN_PROMPT_ANSWER yes
Warning, Masking commands for plugins "login" because a core command or other plugin with that name already exists.
❯ vim ~/.config/tanzu/config.yaml

❯ vim ~/.config/tanzu/config-ng.yaml

❯ ./bin/tanzu ceip set false
Warning, Masking commands for plugins "login" because a core command or other plugin with that name already exists.
❯ ./bin/tanzu ceip get
Warning, Masking commands for plugins "login" because a core command or other plugin with that name already exists.
  CEIP-STATUS
  Opt-out

Then, removed the CEIP opt-in config from the configuration and tested tanzu config init and could see the ceip prompt showing up

❯ ./bin/tanzu config init
Warning, Masking commands for plugins "login" because a core command or other plugin with that name already exists.
?
VMware's Customer Experience Improvement Program ("CEIP") provides VMware with information that enables VMware to improve its products and services and fix problems. By choosing to participate in CEIP, you agree that VMware may collect technical information about your use of VMware products and services on a regular basis. This information does not personally identify you.
For more details about the Program, please see http://www.vmware.com/trustvmware/ceip.html

Do you agree to Participate in the Customer Experience Improvement Program?
  [Use arrows to move, type to filter]
> Yes
  No

Tested the tanzu ceip-participation command help to show the details description for the command

❯ ./bin/tanzu ceip-participation
Warning, Masking commands for plugins "login" because a core command or other plugin with that name already exists.
Manage VMware's Customer Experience Improvement Program (CEIP) participation which provides VMware with information that enables VMware to improve its products and services and fix problems

Usage:
  tanzu ceip-participation [command]

Aliases:
  ceip-participation, ceip

Available Commands:
  get         Get the current CEIP opt-in status
  set         Set the opt-in preference for CEIP

Flags:
  -h, --help   help for ceip-participation

Use "tanzu ceip-participation [command] --help" for more information about a command.

Release note

Disabled the CEIP participation prompt for tanzu 'version', 'ceip set' and 'config set' commands

Additional information

Special notes for your reviewer

@prkalle prkalle requested a review from a team as a code owner April 6, 2023 19:13
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.

Just a minor nit. We can address it as a followup as well. Otherwise LGTM.

pkg/command/root.go Outdated Show resolved Hide resolved
@vuil
Copy link
Contributor

vuil commented Apr 6, 2023

Nit: If we don't add as code comments, I suggest we put in the "What this PR does / why we need it" PR description on the reason(s) we elected to special-case these commands so we don't forget. (this is a "why we need it" part :-) )

@prkalle
Copy link
Contributor Author

prkalle commented Apr 6, 2023

Nit: If we don't add as code comments, I suggest we put in the "What this PR does / why we need it" PR description on the reason(s) we elected to special-case these commands so we don't forget. (this is a "why we need it" part :-) )

Added the reasoning in the code comments and PR description

…commands

- Disable CEIP prompt for `tanzu version`, 'tanzu ceip set' and 'tanzu config set'
- Also updated the short/long description for CEIP command

Signed-off-by: Prem Kumar Kalle <pkalle@vmware.com>
@prkalle prkalle merged commit 4b1f8e6 into vmware-tanzu:main Apr 6, 2023
@vuil vuil added the kind/bug PR/issue related to a bug label Apr 7, 2023
@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
Labels
cla-not-required kind/bug PR/issue related to a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable CEIP participation prompt for tanzu 'verison', 'ceip set' and 'config set' commands
5 participants