konf-go icon indicating copy to clipboard operation
konf-go copied to clipboard

Better handling of namespace prompt when connection timeout

Open SimonTheLeg opened this issue 2 years ago • 0 comments

When you have no connection to a cluster, and run konf ns a blocking, but empty dialogue is displayed which only

image

Only after a while the error message appears:

Error: Get "<sanitized>/api/v1/namespaces": dial tcp <sanitized>: i/o timeout
Usage:
  konf namespace [flags]

Aliases:
  namespace, ns

Flags:
  -h, --help   help for namespace

Global Flags:
      --konf-dir string   konfs directory for kubeconfigs and tracking active konfs (default is $HOME/.kube/konfs)
      --silent            suppress log output if set to true (default is false)

Error: Get "<sanitized>/api/v1/namespaces": dial tcp <sanitized>: i/o timeout

Steps to reproduces:

  1. Select a cluster which you cannot connect to
  2. run konf ns

Expected behaviour: Should display some hint, that we are attempting to connect to the cluster, before we display the empty dialogue.

SimonTheLeg avatar Jul 24 '22 10:07 SimonTheLeg