upbound / up

The @upbound CLI
Apache License 2.0
49 stars 42 forks source link

`up ctx` outputs wrong name for connected Space #557

Closed branden closed 3 weeks ago

branden commented 3 weeks ago

What happened?

I have a kind Space connected to dev named branden-test-1. When I use up ctx to select it, I can see its name:

branden@crateria upbound-dev % up ctx
  Upbound branden-org2/branden-test-1/

       [spaces] ..
        [group] bar
        [group] baz
        [group] branden-test-1
        [group] branden-test-2
        [group] default
                Switch context to "branden-test-1"

  ↑/k up • ↓/j down • ←/h back • →/l/enter select • q/f10 switch context & quit

I hit q to select the context and quit. But when I run up ctx again, the name of the connected Space is output as proxy:

branden@crateria upbound-dev % up ctx
  Upbound branden-org2/proxy/

       [spaces] ..
        [group] bar
        [group] baz
        [group] branden-test-1
        [group] branden-test-2
        [group] default
                Switch context to "proxy"

  ↑/k up • ↓/j down • ←/h back • →/l/enter select • q/f10 switch context & quit

If I navigate back up to the list of all Spaces, the name is rendered correctly again.

How can we reproduce it?

Attach a space to dev. Use up ctx to select the attached space. Run up ctx again and observe that the name of the Space is now output as proxy.

What environment did it happen in?

dev, kind

up version:

Client:
  Version:     v0.31.0-rc.0.52.gde737b7
  Go Version:  go1.22.2
  Git Commit:  de737b7
  OS/Arch:     darwin/arm64