up ctx lists disconnected spaces by (serially) connecting to each context in the user's kubeconfig and attempting to get the configmap that stores ingress details for Spaces. If you have a lot of contexts, or if some of them are slow/unreachable, this can by very slow or hang entirely.
How can we reproduce it?
Run up ctx and navigate to Disconnected Spaces when your kubeconfig contains a context whose cluster is unreachable from your network.
Proposed Fixes
Handle some number (say 100) contexts in parallel.
Time-bound each request and the whole loop so we don't hang for too long.
Show an error if we fail/timeout probing some context, so the user isn't surprised if a space "disappears" from the list (present one day, gone the next).
Possibly add some UI indication that work is being done (a spinner?) so it doesn't look frozen if it's taking 1-2 seconds.
What happened?
up ctx
lists disconnected spaces by (serially) connecting to each context in the user's kubeconfig and attempting to get the configmap that stores ingress details for Spaces. If you have a lot of contexts, or if some of them are slow/unreachable, this can by very slow or hang entirely.How can we reproduce it?
Run
up ctx
and navigate toDisconnected Spaces
when your kubeconfig contains a context whose cluster is unreachable from your network.Proposed Fixes