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

Fix incorrect context name being created when using new tanzu platform endpoints #808

Merged

Conversation

anujc25
Copy link
Contributor

@anujc25 anujc25 commented Sep 12, 2024

What this PR does / why we need it

Fix incorrect context name being created when using new endpoints

Which issue(s) this PR fixes

Fixes #

Describe testing done for PR

Before this change:

$ tz login --staging --endpoint https://platform-dev.tanzu.broadcom.com

$ tz context list
  NAME                                      ISACTIVE  TYPE   PROJECT  SPACE
  tpsm-5a2f0150                             false     tanzu

After this change:

$ tz login --staging --endpoint https://platform-dev.tanzu.broadcom.com

$ tz context list
  NAME                                      ISACTIVE  TYPE   PROJECT  SPACE
  Falcons-staging-5a2f0150                  true      tanzu

Release note

Fix incorrect context name being created when using new tanzu platform endpoints

Additional information

Special notes for your reviewer

@anujc25 anujc25 requested a review from a team as a code owner September 12, 2024 05:44
@anujc25 anujc25 changed the title Fix incorrect context name being created when using new endpoints Fix incorrect context name being created when using new tanzu platform endpoints Sep 12, 2024
@anujc25 anujc25 force-pushed the fix-context-name-with-gcp-endpoints-v2 branch from fee6321 to 69bdae1 Compare September 12, 2024 06:47
Copy link
Contributor

@marckhouzam marckhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually hit this problem yesterday while debugging and it was pretty annoying (and wrong).
Thanks for fixing!

In the PR description did you mean to refer to #801 instead of #808 (which is the current PR 😄 )

Copy link
Contributor

@vuil vuil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and updating the tests to clarify the behavior.
Just a small nit on the comments.

pkg/command/login_test.go Outdated Show resolved Hide resolved
@anujc25 anujc25 force-pushed the fix-context-name-with-gcp-endpoints-v2 branch from 69bdae1 to 91136d9 Compare September 12, 2024 16:45
@anujc25 anujc25 merged commit 0d8192a into vmware-tanzu:main Sep 12, 2024
7 checks passed
@marckhouzam marckhouzam added this to the v1.5.0 milestone Sep 13, 2024
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.

4 participants