{"action":"created","comment":{"url":"https://api.github.com/repos/docker/cli/pulls/comments/242857226","pull_request_review_id":186460247,"id":242857226,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mjg1NzIyNg==","diff_hunk":"@@ -0,0 +1,22 @@\n+// Package store provides a generic way to store credentials to connect to virtually any kind of remote system.\n+// The `context` term comes from the similar feature in Kubernetes kubectl config files.\n+//\n+// Conceptually, a context is a set of metadata and TLS data, that can be used to connect to various endpoints\n+// of the remote system. TLS data and metadata are stored separately, so that in the future, we will be able to store sensitive\n+// information in a more secure way, depending on the os we are running on (e.g.: on Windows we could use the user Certificate Store, on Mac OS the user Keychain...).\n+//\n+// Current implementation is purely file based with the following structure:\n+// ${CONTEXT_ROOT}\n+//   - config.json: contains the current \"default\" context\n+//   - meta/\n+//     - context1/meta.json: contains context medata (key/value pairs) as well as a list of endpoints (themselves containing key/value pair metadata)\n+//     - contexts/can/also/be/folded/like/this/meta.json: same as context1, but for a context named `contexts/can/also/be/folded/like/this`","path":"cli/context/store/doc.go","position":12,"original_position":13,"commit_id":"bd396cd9c8965cc4e96cfe61fd3daefda8c569dc","original_commit_id":"d89a59bd09e1041f930119cd4a5cd7306fc2b08d","user":{"login":"thaJeztah","id":1804568,"node_id":"MDQ6VXNlcjE4MDQ1Njg=","avatar_url":"https://avatars2.githubusercontent.com/u/1804568?v=4","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"body":"Inheritance would be good indeed (being able to set global options and override them per context); guess we can do so in a follow up?","created_at":"2018-12-19T10:07:04Z","updated_at":"2018-12-19T10:09:58Z","html_url":"https://github.com/docker/cli/pull/1500#discussion_r242857226","pull_request_url":"https://api.github.com/repos/docker/cli/pulls/1500","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/docker/cli/pulls/comments/242857226"},"html":{"href":"https://github.com/docker/cli/pull/1500#discussion_r242857226"},"pull_request":{"href":"https://api.github.com/repos/docker/cli/pulls/1500"}},"in_reply_to_id":233781635},"pull_request":{"url":"https://api.github.com/repos/docker/cli/pulls/1500","id":228987692,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4OTg3Njky","html_url":"https://github.com/docker/cli/pull/1500","diff_url":"https://github.com/docker/cli/pull/1500.diff","patch_url":"https://github.com/docker/cli/pull/1500.patch","issue_url":"https://api.github.com/repos/docker/cli/issues/1500","number":1500,"state":"open","locked":false,"title":"Fast context switch: foundation","user":{"login":"simonferquel","id":1677333,"node_id":"MDQ6VXNlcjE2NzczMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/1677333?v=4","gravatar_id":"","url":"https://api.github.com/users/simonferquel","html_url":"https://github.com/simonferquel","followers_url":"https://api.github.com/users/simonferquel/followers","following_url":"https://api.github.com/users/simonferquel/following{/other_user}","gists_url":"https://api.github.com/users/simonferquel/gists{/gist_id}","starred_url":"https://api.github.com/users/simonferquel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonferquel/subscriptions","organizations_url":"https://api.github.com/users/simonferquel/orgs","repos_url":"https://api.github.com/users/simonferquel/repos","events_url":"https://api.github.com/users/simonferquel/events{/privacy}","received_events_url":"https://api.github.com/users/simonferquel/received_events","type":"User","site_admin":false},"body":"**- What I did**\r\n\r\nThis is foundational work for enabling support for fast context switch. ~This is related to https://github.com/moby/moby/pull/38148~. -> actually, the code from moby/moby has been pulled out into this PR. Keeping the link for discussion history\r\n\r\nWhat it does is that it modifies how the CLI behaves to configure clients for both Docker engine and Kubernetes. It also change the way the default value for orchestrator in stacks related command is defined, making it possible to set a different default value on each context\r\n\r\n**- How I did it**\r\n\r\nThis leverages the moby side PR, and add similar facilities to create/parse endpoint information for Kubernetes\r\n\r\n**- How to verify it**\r\n\r\nUnit tests + upcoming commands PR related to context switch\r\n\r\n**- Description for the changelog**\r\n\r\nFast context switch: you can now store, import and export credentials for different clusters and switch between them quickly using the command line\r\n\r\n**- A picture of a cute animal (not mandatory but encouraged)**\r\n\r\n","created_at":"2018-11-07T10:50:00Z","updated_at":"2018-12-19T10:09:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3b2463144b754e4837829742905e60c72b7d8dc","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dnephin","id":442180,"node_id":"MDQ6VXNlcjQ0MjE4MA==","avatar_url":"https://avatars1.githubusercontent.com/u/442180?v=4","gravatar_id":"","url":"https://api.github.com/users/dnephin","html_url":"https://github.com/dnephin","followers_url":"https://api.github.com/users/dnephin/followers","following_url":"https://api.github.com/users/dnephin/following{/other_user}","gists_url":"https://api.github.com/users/dnephin/gists{/gist_id}","starred_url":"https://api.github.com/users/dnephin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnephin/subscriptions","organizations_url":"https://api.github.com/users/dnephin/orgs","repos_url":"https://api.github.com/users/dnephin/repos","events_url":"https://api.github.com/users/dnephin/events{/privacy}","received_events_url":"https://api.github.com/users/dnephin/received_events","type":"User","site_admin":false},{"login":"dhiltgen","id":4033016,"node_id":"MDQ6VXNlcjQwMzMwMTY=","avatar_url":"https://avatars2.githubusercontent.com/u/4033016?v=4","gravatar_id":"","url":"https://api.github.com/users/dhiltgen","html_url":"https://github.com/dhiltgen","followers_url":"https://api.github.com/users/dhiltgen/followers","following_url":"https://api.github.com/users/dhiltgen/following{/other_user}","gists_url":"https://api.github.com/users/dhiltgen/gists{/gist_id}","starred_url":"https://api.github.com/users/dhiltgen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhiltgen/subscriptions","organizations_url":"https://api.github.com/users/dhiltgen/orgs","repos_url":"https://api.github.com/users/dhiltgen/repos","events_url":"https://api.github.com/users/dhiltgen/events{/privacy}","received_events_url":"https://api.github.com/users/dhiltgen/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":585916071,"node_id":"MDU6TGFiZWw1ODU5MTYwNzE=","url":"https://api.github.com/repos/docker/cli/labels/status/2-code-review","name":"status/2-code-review","color":"fad8c7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/docker/cli/pulls/1500/commits","review_comments_url":"https://api.github.com/repos/docker/cli/pulls/1500/comments","review_comment_url":"https://api.github.com/repos/docker/cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/cli/issues/1500/comments","statuses_url":"https://api.github.com/repos/docker/cli/statuses/bd396cd9c8965cc4e96cfe61fd3daefda8c569dc","head":{"label":"simonferquel:use-context-foundation","ref":"use-context-foundation","sha":"bd396cd9c8965cc4e96cfe61fd3daefda8c569dc","user":{"login":"simonferquel","id":1677333,"node_id":"MDQ6VXNlcjE2NzczMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/1677333?v=4","gravatar_id":"","url":"https://api.github.com/users/simonferquel","html_url":"https://github.com/simonferquel","followers_url":"https://api.github.com/users/simonferquel/followers","following_url":"https://api.github.com/users/simonferquel/following{/other_user}","gists_url":"https://api.github.com/users/simonferquel/gists{/gist_id}","starred_url":"https://api.github.com/users/simonferquel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonferquel/subscriptions","organizations_url":"https://api.github.com/users/simonferquel/orgs","repos_url":"https://api.github.com/users/simonferquel/repos","events_url":"https://api.github.com/users/simonferquel/events{/privacy}","received_events_url":"https://api.github.com/users/simonferquel/received_events","type":"User","site_admin":false},"repo":{"id":99563380,"node_id":"MDEwOlJlcG9zaXRvcnk5OTU2MzM4MA==","name":"cli","full_name":"simonferquel/cli","private":false,"owner":{"login":"simonferquel","id":1677333,"node_id":"MDQ6VXNlcjE2NzczMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/1677333?v=4","gravatar_id":"","url":"https://api.github.com/users/simonferquel","html_url":"https://github.com/simonferquel","followers_url":"https://api.github.com/users/simonferquel/followers","following_url":"https://api.github.com/users/simonferquel/following{/other_user}","gists_url":"https://api.github.com/users/simonferquel/gists{/gist_id}","starred_url":"https://api.github.com/users/simonferquel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonferquel/subscriptions","organizations_url":"https://api.github.com/users/simonferquel/orgs","repos_url":"https://api.github.com/users/simonferquel/repos","events_url":"https://api.github.com/users/simonferquel/events{/privacy}","received_events_url":"https://api.github.com/users/simonferquel/received_events","type":"User","site_admin":false},"html_url":"https://github.com/simonferquel/cli","description":"The Docker CLI","fork":true,"url":"https://api.github.com/repos/simonferquel/cli","forks_url":"https://api.github.com/repos/simonferquel/cli/forks","keys_url":"https://api.github.com/repos/simonferquel/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simonferquel/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simonferquel/cli/teams","hooks_url":"https://api.github.com/repos/simonferquel/cli/hooks","issue_events_url":"https://api.github.com/repos/simonferquel/cli/issues/events{/number}","events_url":"https://api.github.com/repos/simonferquel/cli/events","assignees_url":"https://api.github.com/repos/simonferquel/cli/assignees{/user}","branches_url":"https://api.github.com/repos/simonferquel/cli/branches{/branch}","tags_url":"https://api.github.com/repos/simonferquel/cli/tags","blobs_url":"https://api.github.com/repos/simonferquel/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simonferquel/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simonferquel/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/simonferquel/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simonferquel/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/simonferquel/cli/languages","stargazers_url":"https://api.github.com/repos/simonferquel/cli/stargazers","contributors_url":"https://api.github.com/repos/simonferquel/cli/contributors","subscribers_url":"https://api.github.com/repos/simonferquel/cli/subscribers","subscription_url":"https://api.github.com/repos/simonferquel/cli/subscription","commits_url":"https://api.github.com/repos/simonferquel/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/simonferquel/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/simonferquel/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/simonferquel/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/simonferquel/cli/contents/{+path}","compare_url":"https://api.github.com/repos/simonferquel/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simonferquel/cli/merges","archive_url":"https://api.github.com/repos/simonferquel/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simonferquel/cli/downloads","issues_url":"https://api.github.com/repos/simonferquel/cli/issues{/number}","pulls_url":"https://api.github.com/repos/simonferquel/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/simonferquel/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/simonferquel/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simonferquel/cli/labels{/name}","releases_url":"https://api.github.com/repos/simonferquel/cli/releases{/id}","deployments_url":"https://api.github.com/repos/simonferquel/cli/deployments","created_at":"2017-08-07T09:53:21Z","updated_at":"2017-08-07T09:53:24Z","pushed_at":"2018-12-18T15:50:49Z","git_url":"git://github.com/simonferquel/cli.git","ssh_url":"git@github.com:simonferquel/cli.git","clone_url":"https://github.com/simonferquel/cli.git","svn_url":"https://github.com/simonferquel/cli","homepage":null,"size":21426,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"283d8f95c82e7bc0d4068fb35d9c066217998c18","user":{"login":"docker","id":5429470,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/5429470?v=4","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":88013053,"node_id":"MDEwOlJlcG9zaXRvcnk4ODAxMzA1Mw==","name":"cli","full_name":"docker/cli","private":false,"owner":{"login":"docker","id":5429470,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/5429470?v=4","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/docker/cli","description":"The Docker CLI","fork":false,"url":"https://api.github.com/repos/docker/cli","forks_url":"https://api.github.com/repos/docker/cli/forks","keys_url":"https://api.github.com/repos/docker/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/cli/teams","hooks_url":"https://api.github.com/repos/docker/cli/hooks","issue_events_url":"https://api.github.com/repos/docker/cli/issues/events{/number}","events_url":"https://api.github.com/repos/docker/cli/events","assignees_url":"https://api.github.com/repos/docker/cli/assignees{/user}","branches_url":"https://api.github.com/repos/docker/cli/branches{/branch}","tags_url":"https://api.github.com/repos/docker/cli/tags","blobs_url":"https://api.github.com/repos/docker/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/cli/languages","stargazers_url":"https://api.github.com/repos/docker/cli/stargazers","contributors_url":"https://api.github.com/repos/docker/cli/contributors","subscribers_url":"https://api.github.com/repos/docker/cli/subscribers","subscription_url":"https://api.github.com/repos/docker/cli/subscription","commits_url":"https://api.github.com/repos/docker/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/cli/contents/{+path}","compare_url":"https://api.github.com/repos/docker/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/cli/merges","archive_url":"https://api.github.com/repos/docker/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/cli/downloads","issues_url":"https://api.github.com/repos/docker/cli/issues{/number}","pulls_url":"https://api.github.com/repos/docker/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/cli/labels{/name}","releases_url":"https://api.github.com/repos/docker/cli/releases{/id}","deployments_url":"https://api.github.com/repos/docker/cli/deployments","created_at":"2017-04-12T05:27:42Z","updated_at":"2018-12-19T07:39:50Z","pushed_at":"2018-12-19T09:29:06Z","git_url":"git://github.com/docker/cli.git","ssh_url":"git@github.com:docker/cli.git","clone_url":"https://github.com/docker/cli.git","svn_url":"https://github.com/docker/cli","homepage":null,"size":21475,"stargazers_count":1021,"watchers_count":1021,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":605,"mirror_url":null,"archived":false,"open_issues_count":355,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":605,"open_issues":355,"watchers":1021,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/cli/pulls/1500"},"html":{"href":"https://github.com/docker/cli/pull/1500"},"issue":{"href":"https://api.github.com/repos/docker/cli/issues/1500"},"comments":{"href":"https://api.github.com/repos/docker/cli/issues/1500/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/cli/pulls/1500/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/cli/pulls/1500/commits"},"statuses":{"href":"https://api.github.com/repos/docker/cli/statuses/bd396cd9c8965cc4e96cfe61fd3daefda8c569dc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"thaJeztah"}}