upbound / up

The @upbound CLI
Apache License 2.0
51 stars 41 forks source link

up profile set space override all exisiting profiles #397

Closed haarchri closed 9 months ago

haarchri commented 10 months ago

What happened?

When you utilize the command up profile set space, it will overwrite all previously existing profiles from upbound-saas. This appears to be a bug.

 cat config.json 
{"upbound":{"default":"dev","profiles":{"dev":{"type":"space","account":"upboundengineering","kube_context":"arn:aws:eks:eu-central-1:609897127049:cluster/haarchri-spaces-01-jkp9s-zcn7k"}}}}%     

Epic #

How can we reproduce it?

What environment did it happen in?

up --version
v0.21.0
branden commented 9 months ago

@haarchri I wasn't able to reproduce this. When I ran up profile set space, it only affected the currently active profile. This is the intended behavior.

branden@crateria ~ % up -v
v0.21.0
branden@crateria ~ % rm ~/.up/config.json
branden@crateria ~ % up profile list
No profiles found

branden@crateria ~ % up login
3122e6b9-78c3-4264-995f-068364b00051 logged in
branden@crateria ~ % up login --profile=foo
3122e6b9-78c3-4264-995f-068364b00051 logged in
branden@crateria ~ % up profile list
CURRENT   NAME      TYPE    ACCOUNT   KUBECONFIG   KUBECONTEXT
          default   token   branden
*         foo       token   branden

branden@crateria ~ % up profile set space
Profile "foo" updated to use context "kind-kind" from the default kubeconfig

branden@crateria ~ % up profile list
CURRENT   NAME      TYPE    ACCOUNT   KUBECONFIG   KUBECONTEXT
          default   token   branden
*         foo       space   branden                kind-kind

branden@crateria ~ %
branden commented 9 months ago

@haarchri I'm going to close this out, but please reopen if you're still running into problems.