{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju/pulls/comments/236524200","pull_request_review_id":178613589,"id":236524200,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjUyNDIwMA==","diff_hunk":"@@ -0,0 +1,62 @@\n+// Copyright 2018 Canonical Ltd.\n+// Licensed under the AGPLv3, see LICENCE file for details.\n+\n+package common_test\n+\n+import (\n+\t\"fmt\"\n+\n+\t\"github.com/juju/errors\"\n+\t. \"github.com/juju/testing/checkers\"\n+\n+\tociCommon \"github.com/oracle/oci-go-sdk/common\"\n+\tgc \"gopkg.in/check.v1\"\n+\n+\t\"github.com/juju/juju/provider/oci\"\n+)\n+\n+type errorsSuite struct {","path":"provider/oci/common/errors_test.go","position":18,"original_position":18,"commit_id":"058b359301e04368dbe6aa6012ac14930e1e24ca","original_commit_id":"058b359301e04368dbe6aa6012ac14930e1e24ca","user":{"login":"wallyworld","id":5808968,"node_id":"MDQ6VXNlcjU4MDg5Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/5808968?v=4","gravatar_id":"","url":"https://api.github.com/users/wallyworld","html_url":"https://github.com/wallyworld","followers_url":"https://api.github.com/users/wallyworld/followers","following_url":"https://api.github.com/users/wallyworld/following{/other_user}","gists_url":"https://api.github.com/users/wallyworld/gists{/gist_id}","starred_url":"https://api.github.com/users/wallyworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wallyworld/subscriptions","organizations_url":"https://api.github.com/users/wallyworld/orgs","repos_url":"https://api.github.com/users/wallyworld/repos","events_url":"https://api.github.com/users/wallyworld/events{/privacy}","received_events_url":"https://api.github.com/users/wallyworld/received_events","type":"User","site_admin":false},"body":"I can't see where the suite is registered. What was the output when you ran the tests? I bet it said 0 tests run :-)","created_at":"2018-11-27T05:31:21Z","updated_at":"2018-11-27T05:47:44Z","html_url":"https://github.com/juju/juju/pull/9504#discussion_r236524200","pull_request_url":"https://api.github.com/repos/juju/juju/pulls/9504","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/236524200"},"html":{"href":"https://github.com/juju/juju/pull/9504#discussion_r236524200"},"pull_request":{"href":"https://api.github.com/repos/juju/juju/pulls/9504"}}},"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/9504","id":233774403,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNzc0NDAz","html_url":"https://github.com/juju/juju/pull/9504","diff_url":"https://github.com/juju/juju/pull/9504.diff","patch_url":"https://github.com/juju/juju/pull/9504.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/9504","number":9504,"state":"open","locked":false,"title":"oci: add authorisation checking mechanism to API responses","user":{"login":"timClicks","id":27889,"node_id":"MDQ6VXNlcjI3ODg5","avatar_url":"https://avatars2.githubusercontent.com/u/27889?v=4","gravatar_id":"","url":"https://api.github.com/users/timClicks","html_url":"https://github.com/timClicks","followers_url":"https://api.github.com/users/timClicks/followers","following_url":"https://api.github.com/users/timClicks/following{/other_user}","gists_url":"https://api.github.com/users/timClicks/gists{/gist_id}","starred_url":"https://api.github.com/users/timClicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timClicks/subscriptions","organizations_url":"https://api.github.com/users/timClicks/orgs","repos_url":"https://api.github.com/users/timClicks/repos","events_url":"https://api.github.com/users/timClicks/events{/privacy}","received_events_url":"https://api.github.com/users/timClicks/received_events","type":"User","site_admin":false},"body":"We make use of the juju [`HandleCredentialError`][1] callback mechanism to mark credentials as invalid within Juju when that's detected client-side. \r\n\r\nAll API calls that require a [`CallProviderContext`][2] have had this callback added.\r\n\r\n[1]: https://github.com/juju/juju/provider/common\r\n[2]: https://github.com/juju/juju/environs/context\r\n\r\n## Description of change\r\n\r\nThis change enables Juju to short circuit subsequent requests to the API with credentials that are no longer valid. This reduces the load on the server by preventing workers (for example) to continually poll the API with requests. The short circuit  behaviour makes OCI consistent with the other providers.  \r\n\r\n## QA steps\r\n\r\n * bootstrap into oci\r\n * deploy a workload\r\n * invalidate the user's credentials (via the oracle console?)\r\n * attempt to perform another action within juju\r\n\r\nThis should fail fast and further.\r\n\r\n## Documentation changes\r\n\r\nNone. This change shouldn't be user-facing, except that authorisation errors are now handled more gracefully. \r\n\r\n## Bug reference\r\n\r\nn/a\r\n","created_at":"2018-11-27T04:14:39Z","updated_at":"2018-11-27T05:47:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"836f6f8eb4603a70b17fce8bd2760f02f06f2b77","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/9504/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/9504/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju/issues/9504/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/058b359301e04368dbe6aa6012ac14930e1e24ca","head":{"label":"timClicks:oci-invalidate-credential-on-auth-error","ref":"oci-invalidate-credential-on-auth-error","sha":"058b359301e04368dbe6aa6012ac14930e1e24ca","user":{"login":"timClicks","id":27889,"node_id":"MDQ6VXNlcjI3ODg5","avatar_url":"https://avatars2.githubusercontent.com/u/27889?v=4","gravatar_id":"","url":"https://api.github.com/users/timClicks","html_url":"https://github.com/timClicks","followers_url":"https://api.github.com/users/timClicks/followers","following_url":"https://api.github.com/users/timClicks/following{/other_user}","gists_url":"https://api.github.com/users/timClicks/gists{/gist_id}","starred_url":"https://api.github.com/users/timClicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timClicks/subscriptions","organizations_url":"https://api.github.com/users/timClicks/orgs","repos_url":"https://api.github.com/users/timClicks/repos","events_url":"https://api.github.com/users/timClicks/events{/privacy}","received_events_url":"https://api.github.com/users/timClicks/received_events","type":"User","site_admin":false},"repo":{"id":157261822,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcyNjE4MjI=","name":"juju","full_name":"timClicks/juju","private":false,"owner":{"login":"timClicks","id":27889,"node_id":"MDQ6VXNlcjI3ODg5","avatar_url":"https://avatars2.githubusercontent.com/u/27889?v=4","gravatar_id":"","url":"https://api.github.com/users/timClicks","html_url":"https://github.com/timClicks","followers_url":"https://api.github.com/users/timClicks/followers","following_url":"https://api.github.com/users/timClicks/following{/other_user}","gists_url":"https://api.github.com/users/timClicks/gists{/gist_id}","starred_url":"https://api.github.com/users/timClicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timClicks/subscriptions","organizations_url":"https://api.github.com/users/timClicks/orgs","repos_url":"https://api.github.com/users/timClicks/repos","events_url":"https://api.github.com/users/timClicks/events{/privacy}","received_events_url":"https://api.github.com/users/timClicks/received_events","type":"User","site_admin":false},"html_url":"https://github.com/timClicks/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/timClicks/juju","forks_url":"https://api.github.com/repos/timClicks/juju/forks","keys_url":"https://api.github.com/repos/timClicks/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timClicks/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timClicks/juju/teams","hooks_url":"https://api.github.com/repos/timClicks/juju/hooks","issue_events_url":"https://api.github.com/repos/timClicks/juju/issues/events{/number}","events_url":"https://api.github.com/repos/timClicks/juju/events","assignees_url":"https://api.github.com/repos/timClicks/juju/assignees{/user}","branches_url":"https://api.github.com/repos/timClicks/juju/branches{/branch}","tags_url":"https://api.github.com/repos/timClicks/juju/tags","blobs_url":"https://api.github.com/repos/timClicks/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timClicks/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timClicks/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/timClicks/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timClicks/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/timClicks/juju/languages","stargazers_url":"https://api.github.com/repos/timClicks/juju/stargazers","contributors_url":"https://api.github.com/repos/timClicks/juju/contributors","subscribers_url":"https://api.github.com/repos/timClicks/juju/subscribers","subscription_url":"https://api.github.com/repos/timClicks/juju/subscription","commits_url":"https://api.github.com/repos/timClicks/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/timClicks/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/timClicks/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/timClicks/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/timClicks/juju/contents/{+path}","compare_url":"https://api.github.com/repos/timClicks/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timClicks/juju/merges","archive_url":"https://api.github.com/repos/timClicks/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timClicks/juju/downloads","issues_url":"https://api.github.com/repos/timClicks/juju/issues{/number}","pulls_url":"https://api.github.com/repos/timClicks/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/timClicks/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/timClicks/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timClicks/juju/labels{/name}","releases_url":"https://api.github.com/repos/timClicks/juju/releases{/id}","deployments_url":"https://api.github.com/repos/timClicks/juju/deployments","created_at":"2018-11-12T19:01:58Z","updated_at":"2018-11-21T19:57:29Z","pushed_at":"2018-11-27T03:57:51Z","git_url":"git://github.com/timClicks/juju.git","ssh_url":"git@github.com:timClicks/juju.git","clone_url":"https://github.com/timClicks/juju.git","svn_url":"https://github.com/timClicks/juju","homepage":"juju.ubuntu.com","size":231949,"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":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"juju:develop","ref":"develop","sha":"b74bdd1dc4427f1859414009906c475191e41129","user":{"login":"juju","id":4604548,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ2MDQ1NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/4604548?v=4","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20445947,"node_id":"MDEwOlJlcG9zaXRvcnkyMDQ0NTk0Nw==","name":"juju","full_name":"juju/juju","private":false,"owner":{"login":"juju","id":4604548,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ2MDQ1NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/4604548?v=4","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/juju/juju","description":"juju is devops distilled","fork":false,"url":"https://api.github.com/repos/juju/juju","forks_url":"https://api.github.com/repos/juju/juju/forks","keys_url":"https://api.github.com/repos/juju/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju/teams","hooks_url":"https://api.github.com/repos/juju/juju/hooks","issue_events_url":"https://api.github.com/repos/juju/juju/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju/events","assignees_url":"https://api.github.com/repos/juju/juju/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju/tags","blobs_url":"https://api.github.com/repos/juju/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju/languages","stargazers_url":"https://api.github.com/repos/juju/juju/stargazers","contributors_url":"https://api.github.com/repos/juju/juju/contributors","subscribers_url":"https://api.github.com/repos/juju/juju/subscribers","subscription_url":"https://api.github.com/repos/juju/juju/subscription","commits_url":"https://api.github.com/repos/juju/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/juju/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju/merges","archive_url":"https://api.github.com/repos/juju/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju/downloads","issues_url":"https://api.github.com/repos/juju/juju/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju/releases{/id}","deployments_url":"https://api.github.com/repos/juju/juju/deployments","created_at":"2014-06-03T14:28:10Z","updated_at":"2018-11-27T00:18:30Z","pushed_at":"2018-11-27T04:14:40Z","git_url":"git://github.com/juju/juju.git","ssh_url":"git@github.com:juju/juju.git","clone_url":"https://github.com/juju/juju.git","svn_url":"https://github.com/juju/juju","homepage":"juju.ubuntu.com","size":232034,"stargazers_count":1279,"watchers_count":1279,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":296,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":296,"open_issues":10,"watchers":1279,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/9504"},"html":{"href":"https://github.com/juju/juju/pull/9504"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/9504"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/9504/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/9504/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/9504/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/058b359301e04368dbe6aa6012ac14930e1e24ca"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wallyworld"}}