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 getting stuck in space #508

Merged
merged 2 commits into from
May 9, 2024

Conversation

RedbackThomson
Copy link
Member

Description of your changes

Fixes #507

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

We can now navigate into and then out of a space

$ ./up ctx upbound/upbound-gcp-us-west-1
Kubeconfig context "dev/maincluster" switched to: Upbound upbound/upbound-gcp-us-west-1/
$ ./up ctx .
Kubeconfig context "upbound": Upbound upbound/upbound-gcp-us-west-1/
$ ./up ctx ./default
Kubeconfig context "upbound" switched to: Upbound upbound/upbound-gcp-us-west-1/default/

func (c *Context) GetCurrentSpaceContextScope() (ingressHost string, resource types.NamespacedName, exists bool) {
func (c *Context) GetCurrentSpaceContextScope() (ingressHost string, resource types.NamespacedName, inSpace bool) {
Copy link
Member Author

Choose a reason for hiding this comment

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

exists was a really vague term. What "exists"? inSpace is more concrete, although at the moment this method will return inSpace = true if we're pointed at any valid cluster

Copy link
Member

@adamwg adamwg left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@cbuto cbuto left a comment

Choose a reason for hiding this comment

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

looks good + manual testing worked for me

@RedbackThomson RedbackThomson merged commit 18bb4f5 into upbound:main May 9, 2024
6 checks passed
@RedbackThomson RedbackThomson deleted the stuck-in-space branch May 9, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unable to parse space info from context when exporting space
3 participants