{"action":"opened","issue":{"url":"https://api.github.com/repos/giantswarm/cli/issues/436","labels_url":"https://api.github.com/repos/giantswarm/cli/issues/436/labels{/name}","comments_url":"https://api.github.com/repos/giantswarm/cli/issues/436/comments","events_url":"https://api.github.com/repos/giantswarm/cli/issues/436/events","html_url":"https://github.com/giantswarm/cli/issues/436","id":111346272,"number":436,"title":"'swarm info' should reveal cluster and API endpoint details","user":{"login":"marians","id":273727,"avatar_url":"https://avatars.githubusercontent.com/u/273727?v=3","gravatar_id":"","url":"https://api.github.com/users/marians","html_url":"https://github.com/marians","followers_url":"https://api.github.com/users/marians/followers","following_url":"https://api.github.com/users/marians/following{/other_user}","gists_url":"https://api.github.com/users/marians/gists{/gist_id}","starred_url":"https://api.github.com/users/marians/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marians/subscriptions","organizations_url":"https://api.github.com/users/marians/orgs","repos_url":"https://api.github.com/users/marians/repos","events_url":"https://api.github.com/users/marians/events{/privacy}","received_events_url":"https://api.github.com/users/marians/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/giantswarm/cli/labels/3%20-%20status/spec","name":"3 - status/spec","color":"e6e6e6"}],"state":"open","locked":false,"assignee":{"login":"marians","id":273727,"avatar_url":"https://avatars.githubusercontent.com/u/273727?v=3","gravatar_id":"","url":"https://api.github.com/users/marians","html_url":"https://github.com/marians","followers_url":"https://api.github.com/users/marians/followers","following_url":"https://api.github.com/users/marians/following{/other_user}","gists_url":"https://api.github.com/users/marians/gists{/gist_id}","starred_url":"https://api.github.com/users/marians/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marians/subscriptions","organizations_url":"https://api.github.com/users/marians/orgs","repos_url":"https://api.github.com/users/marians/repos","events_url":"https://api.github.com/users/marians/events{/privacy}","received_events_url":"https://api.github.com/users/marians/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-10-14T08:14:21Z","updated_at":"2015-10-14T08:14:21Z","closed_at":null,"body":"Story: As a user, I want to get all relevant context information when calling `swarm info`.\r\n\r\nThis is how `swarm info` can look, currently:\r\n\r\n```\r\nCluster status:      reachable\r\nSwarm CLI version:   0.22.1+git\r\nLogged in as user:   marian\r\nCurrent environment: marian/dev\r\n```\r\n\r\nThere are issues with this:\r\n\r\n- We don't display the API endpoint. In case an environment variable (`SWARM_ENDPOINT_URL `) or the `--api-endpoint` flag is used, which might be the case when using an alias for `swarm`, the user could use a non-default API endpoint without knowing. We should make it possible to discover this here.\r\n\r\n- We don't show which cluster the user is connecting to. We say it's reachable (or not), but we dno't show which one. As above, there could be an environment variable effective on the user's side (`SWARM_CLUSTER_ID`) or the server-side configuration based on the organization might affect this. So in order to understand what's actually going on, we need to output this here.\r\n\r\nWe decided first to hide these facts since we thought that users wouldn't need to think about this. It turns out that this is no longer true with more dedicated and on-premise customers.\r\n\r\nHere is a proposed fix:\r\n\r\n```\r\nSwarm CLI version:   0.22.1+git\r\nLogged in as user:   marian\r\nAPI Endpoint:        https://api.giantswarm.io\r\nCurrent environment: marian/dev\r\nCluster ID:          aws-alpha.private.giantswarm.io\r\nCluster status:      reachable\r\n```\r\n\r\nThe order of information display follows an implicit hierarchical logic:\r\n\r\n1. CLI version is at the top, since this isn't affected by anything else but the software the user installed.\r\n2. The current user name is second. This is also not affected by anything else but a user's decision.\r\n3. The API endpoint defines the context on the topmost level, so it comes next.\r\n4. The currently selected org and env (=environment) has to be known in the selected API context and it influences (unless overridden) the cluster to be used\r\n5. The currently selected cluster ID. It comes as a result of the env selection above or a direct setting.\r\n6. The cluster status refers to the cluster mentioned one line above.\r\n\r\nThere is an issue https://github.com/giantswarm/cli/issues/273 about which cluster to ping. With the specs above, it's obvious to me that we need to ping exactly the cluster displayed in the row above."}}