{"action":"created","comment":{"url":"https://api.github.com/repos/jetstack/cert-manager/pulls/comments/230772361","pull_request_review_id":171583453,"id":230772361,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDc3MjM2MQ==","diff_hunk":"@@ -105,14 +155,31 @@ func (a *Acme) Setup(ctx context.Context) (issuer.SetupResponse, error) {\n \t\tglog.V(4).Infof(\"%s: %s\", a.issuer.GetObjectMeta().Name, s)\n \t\ta.Recorder.Event(a.issuer, v1.EventTypeWarning, errorAccountVerificationFailed, s)\n \t\ta.issuer.UpdateStatusCondition(v1alpha1.IssuerConditionReady, v1alpha1.ConditionFalse, errorAccountRegistrationFailed, s)\n+\n+\t\tacmeErr, ok := err.(*acmeapi.Error)\n+\t\t// If this is not an ACME error, we will simply return it and retry later\n+\t\tif !ok {\n+\t\t\treturn issuer.SetupResponse{Requeue: true}, err\n+\t\t}\n+\n+\t\t// If the status code is 400 (BadRequest), we will *not* retry this registration\n+\t\t// as it implies that something about the request (i.e. email address or private key)\n+\t\t// is invalid.\n+\t\t// TODO: What about other types of 4xx error?\n+\t\tif acmeErr.StatusCode == 400 {\n+\t\t\tglog.V(4).Infof(\"Skipping retrying account registration as a BadRequest response was returned from the ACME server: %v\", acmeErr)\n+\t\t\treturn issuer.SetupResponse{}, nil\n+\t\t}\n+\n+\t\t// Otherwise if we receive anything other than a 400, we will retry.\n \t\treturn issuer.SetupResponse{Requeue: true}, err\n \t}\n \n \tglog.Infof(\"%s: verified existing registration with ACME server\", a.issuer.GetObjectMeta().Name)\n \ta.issuer.UpdateStatusCondition(v1alpha1.IssuerConditionReady, v1alpha1.ConditionTrue, successAccountRegistered, messageAccountRegistered)\n \ta.issuer.GetStatus().ACMEStatus().URI = account.URL\n \n-\treturn issuer.SetupResponse{}, err\n+\treturn issuer.SetupResponse{}, nil","path":"pkg/issuer/acme/setup.go","position":93,"original_position":93,"commit_id":"0160d6aa048eb4eed26e89eb676b52eb503d6f2d","original_commit_id":"0160d6aa048eb4eed26e89eb676b52eb503d6f2d","user":{"login":"munnerz","id":203583,"node_id":"MDQ6VXNlcjIwMzU4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/203583?v=4","gravatar_id":"","url":"https://api.github.com/users/munnerz","html_url":"https://github.com/munnerz","followers_url":"https://api.github.com/users/munnerz/followers","following_url":"https://api.github.com/users/munnerz/following{/other_user}","gists_url":"https://api.github.com/users/munnerz/gists{/gist_id}","starred_url":"https://api.github.com/users/munnerz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munnerz/subscriptions","organizations_url":"https://api.github.com/users/munnerz/orgs","repos_url":"https://api.github.com/users/munnerz/repos","events_url":"https://api.github.com/users/munnerz/events{/privacy}","received_events_url":"https://api.github.com/users/munnerz/received_events","type":"User","site_admin":false},"body":"This change is not really related to this PR, and is a no-op as we already handle the case where `err != nil` above 😄","created_at":"2018-11-05T14:38:45Z","updated_at":"2018-11-05T14:38:45Z","html_url":"https://github.com/jetstack/cert-manager/pull/1032#discussion_r230772361","pull_request_url":"https://api.github.com/repos/jetstack/cert-manager/pulls/1032","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/jetstack/cert-manager/pulls/comments/230772361"},"html":{"href":"https://github.com/jetstack/cert-manager/pull/1032#discussion_r230772361"},"pull_request":{"href":"https://api.github.com/repos/jetstack/cert-manager/pulls/1032"}}},"pull_request":{"url":"https://api.github.com/repos/jetstack/cert-manager/pulls/1032","id":227239494,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MjM5NDk0","html_url":"https://github.com/jetstack/cert-manager/pull/1032","diff_url":"https://github.com/jetstack/cert-manager/pull/1032.diff","patch_url":"https://github.com/jetstack/cert-manager/pull/1032.patch","issue_url":"https://api.github.com/repos/jetstack/cert-manager/issues/1032","number":1032,"state":"open","locked":false,"title":"Skip re-checking ACME account status if Issuer is ready and URL hosts match","user":{"login":"munnerz","id":203583,"node_id":"MDQ6VXNlcjIwMzU4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/203583?v=4","gravatar_id":"","url":"https://api.github.com/users/munnerz","html_url":"https://github.com/munnerz","followers_url":"https://api.github.com/users/munnerz/followers","following_url":"https://api.github.com/users/munnerz/following{/other_user}","gists_url":"https://api.github.com/users/munnerz/gists{/gist_id}","starred_url":"https://api.github.com/users/munnerz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munnerz/subscriptions","organizations_url":"https://api.github.com/users/munnerz/orgs","repos_url":"https://api.github.com/users/munnerz/repos","events_url":"https://api.github.com/users/munnerz/events{/privacy}","received_events_url":"https://api.github.com/users/munnerz/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**:\r\n\r\nThis PR updates the ACME setup function to only verify the ACME account when the Ready condition is not currently True, or the Host part of the acme server URL does not match the registered acme account URL.\r\n\r\nIn future, we can look at storing a hash of either the private key or something else in order to re-check more frequently.\r\n\r\ncc @jsha \r\n\r\n**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #1013\r\n\r\n**Release note**:\r\n```release-note\r\nNONE\r\n```\r\n","created_at":"2018-10-31T10:53:17Z","updated_at":"2018-11-05T14:38:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e714d90075831662baaf90a8b75cccffa55161f3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kragniz","id":735008,"node_id":"MDQ6VXNlcjczNTAwOA==","avatar_url":"https://avatars2.githubusercontent.com/u/735008?v=4","gravatar_id":"","url":"https://api.github.com/users/kragniz","html_url":"https://github.com/kragniz","followers_url":"https://api.github.com/users/kragniz/followers","following_url":"https://api.github.com/users/kragniz/following{/other_user}","gists_url":"https://api.github.com/users/kragniz/gists{/gist_id}","starred_url":"https://api.github.com/users/kragniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kragniz/subscriptions","organizations_url":"https://api.github.com/users/kragniz/orgs","repos_url":"https://api.github.com/users/kragniz/repos","events_url":"https://api.github.com/users/kragniz/events{/privacy}","received_events_url":"https://api.github.com/users/kragniz/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":728691140,"node_id":"MDU6TGFiZWw3Mjg2OTExNDA=","url":"https://api.github.com/repos/jetstack/cert-manager/labels/area/provider-acme","name":"area/provider-acme","color":"0052cc","default":false},{"id":1041273320,"node_id":"MDU6TGFiZWwxMDQxMjczMzIw","url":"https://api.github.com/repos/jetstack/cert-manager/labels/dco-signoff:%20yes","name":"dco-signoff: yes","color":"61e552","default":false},{"id":728589163,"node_id":"MDU6TGFiZWw3Mjg1ODkxNjM=","url":"https://api.github.com/repos/jetstack/cert-manager/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":728658201,"node_id":"MDU6TGFiZWw3Mjg2NTgyMDE=","url":"https://api.github.com/repos/jetstack/cert-manager/labels/size/M","name":"size/M","color":"eebb00","default":false}],"milestone":{"url":"https://api.github.com/repos/jetstack/cert-manager/milestones/8","html_url":"https://github.com/jetstack/cert-manager/milestone/8","labels_url":"https://api.github.com/repos/jetstack/cert-manager/milestones/8/labels","id":3488527,"node_id":"MDk6TWlsZXN0b25lMzQ4ODUyNw==","number":8,"title":"v0.5","description":"","creator":{"login":"munnerz","id":203583,"node_id":"MDQ6VXNlcjIwMzU4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/203583?v=4","gravatar_id":"","url":"https://api.github.com/users/munnerz","html_url":"https://github.com/munnerz","followers_url":"https://api.github.com/users/munnerz/followers","following_url":"https://api.github.com/users/munnerz/following{/other_user}","gists_url":"https://api.github.com/users/munnerz/gists{/gist_id}","starred_url":"https://api.github.com/users/munnerz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munnerz/subscriptions","organizations_url":"https://api.github.com/users/munnerz/orgs","repos_url":"https://api.github.com/users/munnerz/repos","events_url":"https://api.github.com/users/munnerz/events{/privacy}","received_events_url":"https://api.github.com/users/munnerz/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":15,"state":"open","created_at":"2018-07-11T11:58:53Z","updated_at":"2018-11-01T10:49:42Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jetstack/cert-manager/pulls/1032/commits","review_comments_url":"https://api.github.com/repos/jetstack/cert-manager/pulls/1032/comments","review_comment_url":"https://api.github.com/repos/jetstack/cert-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jetstack/cert-manager/issues/1032/comments","statuses_url":"https://api.github.com/repos/jetstack/cert-manager/statuses/0160d6aa048eb4eed26e89eb676b52eb503d6f2d","head":{"label":"munnerz:acme-skip-recheck-acc","ref":"acme-skip-recheck-acc","sha":"0160d6aa048eb4eed26e89eb676b52eb503d6f2d","user":{"login":"munnerz","id":203583,"node_id":"MDQ6VXNlcjIwMzU4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/203583?v=4","gravatar_id":"","url":"https://api.github.com/users/munnerz","html_url":"https://github.com/munnerz","followers_url":"https://api.github.com/users/munnerz/followers","following_url":"https://api.github.com/users/munnerz/following{/other_user}","gists_url":"https://api.github.com/users/munnerz/gists{/gist_id}","starred_url":"https://api.github.com/users/munnerz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munnerz/subscriptions","organizations_url":"https://api.github.com/users/munnerz/orgs","repos_url":"https://api.github.com/users/munnerz/repos","events_url":"https://api.github.com/users/munnerz/events{/privacy}","received_events_url":"https://api.github.com/users/munnerz/received_events","type":"User","site_admin":false},"repo":{"id":104815853,"node_id":"MDEwOlJlcG9zaXRvcnkxMDQ4MTU4NTM=","name":"cert-manager","full_name":"munnerz/cert-manager","private":false,"owner":{"login":"munnerz","id":203583,"node_id":"MDQ6VXNlcjIwMzU4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/203583?v=4","gravatar_id":"","url":"https://api.github.com/users/munnerz","html_url":"https://github.com/munnerz","followers_url":"https://api.github.com/users/munnerz/followers","following_url":"https://api.github.com/users/munnerz/following{/other_user}","gists_url":"https://api.github.com/users/munnerz/gists{/gist_id}","starred_url":"https://api.github.com/users/munnerz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munnerz/subscriptions","organizations_url":"https://api.github.com/users/munnerz/orgs","repos_url":"https://api.github.com/users/munnerz/repos","events_url":"https://api.github.com/users/munnerz/events{/privacy}","received_events_url":"https://api.github.com/users/munnerz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/munnerz/cert-manager","description":"Automatically provision TLS certificates for Kubernetes","fork":true,"url":"https://api.github.com/repos/munnerz/cert-manager","forks_url":"https://api.github.com/repos/munnerz/cert-manager/forks","keys_url":"https://api.github.com/repos/munnerz/cert-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/munnerz/cert-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/munnerz/cert-manager/teams","hooks_url":"https://api.github.com/repos/munnerz/cert-manager/hooks","issue_events_url":"https://api.github.com/repos/munnerz/cert-manager/issues/events{/number}","events_url":"https://api.github.com/repos/munnerz/cert-manager/events","assignees_url":"https://api.github.com/repos/munnerz/cert-manager/assignees{/user}","branches_url":"https://api.github.com/repos/munnerz/cert-manager/branches{/branch}","tags_url":"https://api.github.com/repos/munnerz/cert-manager/tags","blobs_url":"https://api.github.com/repos/munnerz/cert-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/munnerz/cert-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/munnerz/cert-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/munnerz/cert-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/munnerz/cert-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/munnerz/cert-manager/languages","stargazers_url":"https://api.github.com/repos/munnerz/cert-manager/stargazers","contributors_url":"https://api.github.com/repos/munnerz/cert-manager/contributors","subscribers_url":"https://api.github.com/repos/munnerz/cert-manager/subscribers","subscription_url":"https://api.github.com/repos/munnerz/cert-manager/subscription","commits_url":"https://api.github.com/repos/munnerz/cert-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/munnerz/cert-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/munnerz/cert-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/munnerz/cert-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/munnerz/cert-manager/contents/{+path}","compare_url":"https://api.github.com/repos/munnerz/cert-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/munnerz/cert-manager/merges","archive_url":"https://api.github.com/repos/munnerz/cert-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/munnerz/cert-manager/downloads","issues_url":"https://api.github.com/repos/munnerz/cert-manager/issues{/number}","pulls_url":"https://api.github.com/repos/munnerz/cert-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/munnerz/cert-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/munnerz/cert-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/munnerz/cert-manager/labels{/name}","releases_url":"https://api.github.com/repos/munnerz/cert-manager/releases{/id}","deployments_url":"https://api.github.com/repos/munnerz/cert-manager/deployments","created_at":"2017-09-26T00:30:00Z","updated_at":"2018-08-07T08:32:11Z","pushed_at":"2018-11-05T14:35:58Z","git_url":"git://github.com/munnerz/cert-manager.git","ssh_url":"git@github.com:munnerz/cert-manager.git","clone_url":"https://github.com/munnerz/cert-manager.git","svn_url":"https://github.com/munnerz/cert-manager","homepage":"","size":58383,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"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":2,"open_issues":2,"watchers":5,"default_branch":"master"}},"base":{"label":"jetstack:master","ref":"master","sha":"86ef1db8117d3dc9c4f8aaba6997059f0cef0bcc","user":{"login":"jetstack","id":13183983,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTgzOTgz","avatar_url":"https://avatars1.githubusercontent.com/u/13183983?v=4","gravatar_id":"","url":"https://api.github.com/users/jetstack","html_url":"https://github.com/jetstack","followers_url":"https://api.github.com/users/jetstack/followers","following_url":"https://api.github.com/users/jetstack/following{/other_user}","gists_url":"https://api.github.com/users/jetstack/gists{/gist_id}","starred_url":"https://api.github.com/users/jetstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jetstack/subscriptions","organizations_url":"https://api.github.com/users/jetstack/orgs","repos_url":"https://api.github.com/users/jetstack/repos","events_url":"https://api.github.com/users/jetstack/events{/privacy}","received_events_url":"https://api.github.com/users/jetstack/received_events","type":"Organization","site_admin":false},"repo":{"id":92313258,"node_id":"MDEwOlJlcG9zaXRvcnk5MjMxMzI1OA==","name":"cert-manager","full_name":"jetstack/cert-manager","private":false,"owner":{"login":"jetstack","id":13183983,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTgzOTgz","avatar_url":"https://avatars1.githubusercontent.com/u/13183983?v=4","gravatar_id":"","url":"https://api.github.com/users/jetstack","html_url":"https://github.com/jetstack","followers_url":"https://api.github.com/users/jetstack/followers","following_url":"https://api.github.com/users/jetstack/following{/other_user}","gists_url":"https://api.github.com/users/jetstack/gists{/gist_id}","starred_url":"https://api.github.com/users/jetstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jetstack/subscriptions","organizations_url":"https://api.github.com/users/jetstack/orgs","repos_url":"https://api.github.com/users/jetstack/repos","events_url":"https://api.github.com/users/jetstack/events{/privacy}","received_events_url":"https://api.github.com/users/jetstack/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/jetstack/cert-manager","description":"Automatically provision and manage TLS certificates in Kubernetes","fork":false,"url":"https://api.github.com/repos/jetstack/cert-manager","forks_url":"https://api.github.com/repos/jetstack/cert-manager/forks","keys_url":"https://api.github.com/repos/jetstack/cert-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jetstack/cert-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jetstack/cert-manager/teams","hooks_url":"https://api.github.com/repos/jetstack/cert-manager/hooks","issue_events_url":"https://api.github.com/repos/jetstack/cert-manager/issues/events{/number}","events_url":"https://api.github.com/repos/jetstack/cert-manager/events","assignees_url":"https://api.github.com/repos/jetstack/cert-manager/assignees{/user}","branches_url":"https://api.github.com/repos/jetstack/cert-manager/branches{/branch}","tags_url":"https://api.github.com/repos/jetstack/cert-manager/tags","blobs_url":"https://api.github.com/repos/jetstack/cert-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jetstack/cert-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jetstack/cert-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/jetstack/cert-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jetstack/cert-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/jetstack/cert-manager/languages","stargazers_url":"https://api.github.com/repos/jetstack/cert-manager/stargazers","contributors_url":"https://api.github.com/repos/jetstack/cert-manager/contributors","subscribers_url":"https://api.github.com/repos/jetstack/cert-manager/subscribers","subscription_url":"https://api.github.com/repos/jetstack/cert-manager/subscription","commits_url":"https://api.github.com/repos/jetstack/cert-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/jetstack/cert-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/jetstack/cert-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/jetstack/cert-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/jetstack/cert-manager/contents/{+path}","compare_url":"https://api.github.com/repos/jetstack/cert-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jetstack/cert-manager/merges","archive_url":"https://api.github.com/repos/jetstack/cert-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jetstack/cert-manager/downloads","issues_url":"https://api.github.com/repos/jetstack/cert-manager/issues{/number}","pulls_url":"https://api.github.com/repos/jetstack/cert-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/jetstack/cert-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/jetstack/cert-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jetstack/cert-manager/labels{/name}","releases_url":"https://api.github.com/repos/jetstack/cert-manager/releases{/id}","deployments_url":"https://api.github.com/repos/jetstack/cert-manager/deployments","created_at":"2017-05-24T16:25:59Z","updated_at":"2018-11-05T14:12:09Z","pushed_at":"2018-11-05T14:36:00Z","git_url":"git://github.com/jetstack/cert-manager.git","ssh_url":"git@github.com:jetstack/cert-manager.git","clone_url":"https://github.com/jetstack/cert-manager.git","svn_url":"https://github.com/jetstack/cert-manager","homepage":"","size":56735,"stargazers_count":2261,"watchers_count":2261,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":317,"mirror_url":null,"archived":false,"open_issues_count":183,"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":317,"open_issues":183,"watchers":2261,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jetstack/cert-manager/pulls/1032"},"html":{"href":"https://github.com/jetstack/cert-manager/pull/1032"},"issue":{"href":"https://api.github.com/repos/jetstack/cert-manager/issues/1032"},"comments":{"href":"https://api.github.com/repos/jetstack/cert-manager/issues/1032/comments"},"review_comments":{"href":"https://api.github.com/repos/jetstack/cert-manager/pulls/1032/comments"},"review_comment":{"href":"https://api.github.com/repos/jetstack/cert-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jetstack/cert-manager/pulls/1032/commits"},"statuses":{"href":"https://api.github.com/repos/jetstack/cert-manager/statuses/0160d6aa048eb4eed26e89eb676b52eb503d6f2d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"munnerz"}}