infinyon / fluvio

Lean and mean distributed stream processing system written in rust and web assembly. Alternative to Kafka + Flink in one.
https://www.fluvio.io/
Apache License 2.0
3.88k stars 491 forks source link

Improve and document profile behavior when creating and deleting clusters #1038

Closed nicholastmosher closed 3 years ago

nicholastmosher commented 3 years ago

The current Fluvio profile behavior is somewhat limited and unintuitive, and furthermore it is largely undocumented. Specifically, the behavior when deleting clusters is unexpected. Consider the following set of profiles that were created when signing into Fluvio Cloud and then creating a local Fluvio cluster:

$ fluvio profile view
    PROFILE    CLUSTER    ADDRESS                          TLS
    cloud      cloud      router.cloud.fluvio.io:9003      Verified
 *  local      local      localhost:9003                   Disabled

When deleting the local cluster, not only does the local profile persist in the list of profiles, it also remains the active profile. This means that even though there is a perfectly good profile available, any further CLI commands or client connections will attempt to contact the now-nonexistent local cluster.

$ fluvio cluster delete --local
$ fluvio profile view
 *  local      local      localhost:9003                   Disabled
    cloud      cloud      router.cloud.fluvio.io:9003      Verified

$ fluvio topic list
Error:
   0: Fluvio client error
   1: Fluvio socket error
   2: Connection refused (os error 61)

It seems like it would be more desirable for a profile to be deleted if its cluster is deleted. This is similar to the behavior that minikube has on kubectl contexts when minikube is started and deleted. I am imagining that the desired behavior would look something like the following:

$ fluvio profile view            # We have a local cluster and Cloud cluster
 *  local      local      localhost:9003                   Disabled
    cloud      cloud      router.cloud.fluvio.io:9003      Verified

$ fluvio cluster delete --local  # Upon deleting local cluster, remove local profile and switch active profiles
$ fluvio profile view
 *  cloud      cloud      router.cloud.fluvio.io:9003      Verified

Action items for this issue:

github-actions[bot] commented 3 years ago

Stale issue message