{"action":"created","comment":{"url":"https://api.github.com/repos/xenolf/lego/pulls/comments/55921985","id":55921985,"diff_hunk":"@@ -69,9 +82,16 @@ func (s *dnsChallenge) Solve(chlng challenge, domain string) error {\n \n \tlogf(\"[INFO][%s] Checking DNS record propagation...\", domain)\n \n-\terr = waitFor(30, 2, func() (bool, error) {\n-\t\treturn preCheckDNS(fqdn, value)\n-\t})\n+\tswitch provider := s.provider.(type) {\n+\tcase ChallengeProviderTimeout:\n+\t\terr = waitFor(int(provider.Timeout().Seconds()), 30, func() (bool, error) {","path":"acme/dns_challenge.go","position":29,"original_position":29,"commit_id":"0a9c60cb824a1bca09afec560efed5be4bb9bcb2","original_commit_id":"0a9c60cb824a1bca09afec560efed5be4bb9bcb2","user":{"login":"janeczku","id":3813921,"avatar_url":"https://avatars.githubusercontent.com/u/3813921?v=3","gravatar_id":"","url":"https://api.github.com/users/janeczku","html_url":"https://github.com/janeczku","followers_url":"https://api.github.com/users/janeczku/followers","following_url":"https://api.github.com/users/janeczku/following{/other_user}","gists_url":"https://api.github.com/users/janeczku/gists{/gist_id}","starred_url":"https://api.github.com/users/janeczku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janeczku/subscriptions","organizations_url":"https://api.github.com/users/janeczku/orgs","repos_url":"https://api.github.com/users/janeczku/repos","events_url":"https://api.github.com/users/janeczku/events{/privacy}","received_events_url":"https://api.github.com/users/janeczku/received_events","type":"User","site_admin":false},"body":"I don't think we really want a 30 seconds interval. :smile: ","created_at":"2016-03-12T14:16:34Z","updated_at":"2016-03-12T14:16:34Z","html_url":"https://github.com/xenolf/lego/pull/148#discussion_r55921985","pull_request_url":"https://api.github.com/repos/xenolf/lego/pulls/148","_links":{"self":{"href":"https://api.github.com/repos/xenolf/lego/pulls/comments/55921985"},"html":{"href":"https://github.com/xenolf/lego/pull/148#discussion_r55921985"},"pull_request":{"href":"https://api.github.com/repos/xenolf/lego/pulls/148"}}},"pull_request":{"url":"https://api.github.com/repos/xenolf/lego/pulls/148","id":62113398,"html_url":"https://github.com/xenolf/lego/pull/148","diff_url":"https://github.com/xenolf/lego/pull/148.diff","patch_url":"https://github.com/xenolf/lego/pull/148.patch","issue_url":"https://api.github.com/repos/xenolf/lego/issues/148","number":148,"state":"open","locked":false,"title":"Add ChallengeProviderTimeout type to acme package","user":{"login":"xi2","id":11040056,"avatar_url":"https://avatars.githubusercontent.com/u/11040056?v=3","gravatar_id":"","url":"https://api.github.com/users/xi2","html_url":"https://github.com/xi2","followers_url":"https://api.github.com/users/xi2/followers","following_url":"https://api.github.com/users/xi2/following{/other_user}","gists_url":"https://api.github.com/users/xi2/gists{/gist_id}","starred_url":"https://api.github.com/users/xi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xi2/subscriptions","organizations_url":"https://api.github.com/users/xi2/orgs","repos_url":"https://api.github.com/users/xi2/repos","events_url":"https://api.github.com/users/xi2/events{/privacy}","received_events_url":"https://api.github.com/users/xi2/received_events","type":"User","site_admin":false},"body":"There was what I perceived as a problem with my Gandi `ChallengeProvider` in #133. Because of Gandi's long DNS record propagation time (in my tests, up to 25 minutes), I had to alter the timeout the `acme` package used when checking for record propagation. However, this affected **all** the DNS providers, the remainder of which just require the existing 30 second timeout. Forcing them all to have a 40 minute timeout for the sake of Gandi seemed... wrong?\r\n\r\nThis PR adds a new `ChallengeProviderTimeout` type to the acme package which allows for implementing DNS providers that require an unsually long timeout when checking for record propagation. In fact, although it would only be necessary for DNS providers like Gandi at present, it need not be solely for DNS providers. There could be in the future some yet not-invented challenge type, for which the same problem occured.\r\n\r\nThe Gandi provider in #133 has been altered to use this new interface, so all the remaining DNS providers will now use the 30 second timeout again as normal.\r\n\r\nThoughts?","created_at":"2016-03-08T18:24:13Z","updated_at":"2016-03-12T14:16:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69070f6346664f504c0522eda58a86efcc85571e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xenolf/lego/pulls/148/commits","review_comments_url":"https://api.github.com/repos/xenolf/lego/pulls/148/comments","review_comment_url":"https://api.github.com/repos/xenolf/lego/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xenolf/lego/issues/148/comments","statuses_url":"https://api.github.com/repos/xenolf/lego/statuses/0a9c60cb824a1bca09afec560efed5be4bb9bcb2","head":{"label":"xi2:challenge-provider-custom-timeout","ref":"challenge-provider-custom-timeout","sha":"0a9c60cb824a1bca09afec560efed5be4bb9bcb2","user":{"login":"xi2","id":11040056,"avatar_url":"https://avatars.githubusercontent.com/u/11040056?v=3","gravatar_id":"","url":"https://api.github.com/users/xi2","html_url":"https://github.com/xi2","followers_url":"https://api.github.com/users/xi2/followers","following_url":"https://api.github.com/users/xi2/following{/other_user}","gists_url":"https://api.github.com/users/xi2/gists{/gist_id}","starred_url":"https://api.github.com/users/xi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xi2/subscriptions","organizations_url":"https://api.github.com/users/xi2/orgs","repos_url":"https://api.github.com/users/xi2/repos","events_url":"https://api.github.com/users/xi2/events{/privacy}","received_events_url":"https://api.github.com/users/xi2/received_events","type":"User","site_admin":false},"repo":{"id":51758968,"name":"lego","full_name":"xi2/lego","owner":{"login":"xi2","id":11040056,"avatar_url":"https://avatars.githubusercontent.com/u/11040056?v=3","gravatar_id":"","url":"https://api.github.com/users/xi2","html_url":"https://github.com/xi2","followers_url":"https://api.github.com/users/xi2/followers","following_url":"https://api.github.com/users/xi2/following{/other_user}","gists_url":"https://api.github.com/users/xi2/gists{/gist_id}","starred_url":"https://api.github.com/users/xi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xi2/subscriptions","organizations_url":"https://api.github.com/users/xi2/orgs","repos_url":"https://api.github.com/users/xi2/repos","events_url":"https://api.github.com/users/xi2/events{/privacy}","received_events_url":"https://api.github.com/users/xi2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xi2/lego","description":"Let's Encrypt client and ACME library written in Go","fork":true,"url":"https://api.github.com/repos/xi2/lego","forks_url":"https://api.github.com/repos/xi2/lego/forks","keys_url":"https://api.github.com/repos/xi2/lego/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xi2/lego/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xi2/lego/teams","hooks_url":"https://api.github.com/repos/xi2/lego/hooks","issue_events_url":"https://api.github.com/repos/xi2/lego/issues/events{/number}","events_url":"https://api.github.com/repos/xi2/lego/events","assignees_url":"https://api.github.com/repos/xi2/lego/assignees{/user}","branches_url":"https://api.github.com/repos/xi2/lego/branches{/branch}","tags_url":"https://api.github.com/repos/xi2/lego/tags","blobs_url":"https://api.github.com/repos/xi2/lego/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xi2/lego/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xi2/lego/git/refs{/sha}","trees_url":"https://api.github.com/repos/xi2/lego/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xi2/lego/statuses/{sha}","languages_url":"https://api.github.com/repos/xi2/lego/languages","stargazers_url":"https://api.github.com/repos/xi2/lego/stargazers","contributors_url":"https://api.github.com/repos/xi2/lego/contributors","subscribers_url":"https://api.github.com/repos/xi2/lego/subscribers","subscription_url":"https://api.github.com/repos/xi2/lego/subscription","commits_url":"https://api.github.com/repos/xi2/lego/commits{/sha}","git_commits_url":"https://api.github.com/repos/xi2/lego/git/commits{/sha}","comments_url":"https://api.github.com/repos/xi2/lego/comments{/number}","issue_comment_url":"https://api.github.com/repos/xi2/lego/issues/comments{/number}","contents_url":"https://api.github.com/repos/xi2/lego/contents/{+path}","compare_url":"https://api.github.com/repos/xi2/lego/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xi2/lego/merges","archive_url":"https://api.github.com/repos/xi2/lego/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xi2/lego/downloads","issues_url":"https://api.github.com/repos/xi2/lego/issues{/number}","pulls_url":"https://api.github.com/repos/xi2/lego/pulls{/number}","milestones_url":"https://api.github.com/repos/xi2/lego/milestones{/number}","notifications_url":"https://api.github.com/repos/xi2/lego/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xi2/lego/labels{/name}","releases_url":"https://api.github.com/repos/xi2/lego/releases{/id}","deployments_url":"https://api.github.com/repos/xi2/lego/deployments","created_at":"2016-02-15T13:55:42Z","updated_at":"2016-02-15T13:55:43Z","pushed_at":"2016-03-08T20:04:39Z","git_url":"git://github.com/xi2/lego.git","ssh_url":"git@github.com:xi2/lego.git","clone_url":"https://github.com/xi2/lego.git","svn_url":"https://github.com/xi2/lego","homepage":"","size":364,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xenolf:master","ref":"master","sha":"39eef1c2f6f8025524aa88746c196ae598aeffc3","user":{"login":"xenolf","id":578256,"avatar_url":"https://avatars.githubusercontent.com/u/578256?v=3","gravatar_id":"","url":"https://api.github.com/users/xenolf","html_url":"https://github.com/xenolf","followers_url":"https://api.github.com/users/xenolf/followers","following_url":"https://api.github.com/users/xenolf/following{/other_user}","gists_url":"https://api.github.com/users/xenolf/gists{/gist_id}","starred_url":"https://api.github.com/users/xenolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenolf/subscriptions","organizations_url":"https://api.github.com/users/xenolf/orgs","repos_url":"https://api.github.com/users/xenolf/repos","events_url":"https://api.github.com/users/xenolf/events{/privacy}","received_events_url":"https://api.github.com/users/xenolf/received_events","type":"User","site_admin":false},"repo":{"id":37038121,"name":"lego","full_name":"xenolf/lego","owner":{"login":"xenolf","id":578256,"avatar_url":"https://avatars.githubusercontent.com/u/578256?v=3","gravatar_id":"","url":"https://api.github.com/users/xenolf","html_url":"https://github.com/xenolf","followers_url":"https://api.github.com/users/xenolf/followers","following_url":"https://api.github.com/users/xenolf/following{/other_user}","gists_url":"https://api.github.com/users/xenolf/gists{/gist_id}","starred_url":"https://api.github.com/users/xenolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenolf/subscriptions","organizations_url":"https://api.github.com/users/xenolf/orgs","repos_url":"https://api.github.com/users/xenolf/repos","events_url":"https://api.github.com/users/xenolf/events{/privacy}","received_events_url":"https://api.github.com/users/xenolf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xenolf/lego","description":"Let's Encrypt client and ACME library written in Go","fork":false,"url":"https://api.github.com/repos/xenolf/lego","forks_url":"https://api.github.com/repos/xenolf/lego/forks","keys_url":"https://api.github.com/repos/xenolf/lego/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xenolf/lego/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xenolf/lego/teams","hooks_url":"https://api.github.com/repos/xenolf/lego/hooks","issue_events_url":"https://api.github.com/repos/xenolf/lego/issues/events{/number}","events_url":"https://api.github.com/repos/xenolf/lego/events","assignees_url":"https://api.github.com/repos/xenolf/lego/assignees{/user}","branches_url":"https://api.github.com/repos/xenolf/lego/branches{/branch}","tags_url":"https://api.github.com/repos/xenolf/lego/tags","blobs_url":"https://api.github.com/repos/xenolf/lego/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xenolf/lego/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xenolf/lego/git/refs{/sha}","trees_url":"https://api.github.com/repos/xenolf/lego/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xenolf/lego/statuses/{sha}","languages_url":"https://api.github.com/repos/xenolf/lego/languages","stargazers_url":"https://api.github.com/repos/xenolf/lego/stargazers","contributors_url":"https://api.github.com/repos/xenolf/lego/contributors","subscribers_url":"https://api.github.com/repos/xenolf/lego/subscribers","subscription_url":"https://api.github.com/repos/xenolf/lego/subscription","commits_url":"https://api.github.com/repos/xenolf/lego/commits{/sha}","git_commits_url":"https://api.github.com/repos/xenolf/lego/git/commits{/sha}","comments_url":"https://api.github.com/repos/xenolf/lego/comments{/number}","issue_comment_url":"https://api.github.com/repos/xenolf/lego/issues/comments{/number}","contents_url":"https://api.github.com/repos/xenolf/lego/contents/{+path}","compare_url":"https://api.github.com/repos/xenolf/lego/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xenolf/lego/merges","archive_url":"https://api.github.com/repos/xenolf/lego/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xenolf/lego/downloads","issues_url":"https://api.github.com/repos/xenolf/lego/issues{/number}","pulls_url":"https://api.github.com/repos/xenolf/lego/pulls{/number}","milestones_url":"https://api.github.com/repos/xenolf/lego/milestones{/number}","notifications_url":"https://api.github.com/repos/xenolf/lego/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xenolf/lego/labels{/name}","releases_url":"https://api.github.com/repos/xenolf/lego/releases{/id}","deployments_url":"https://api.github.com/repos/xenolf/lego/deployments","created_at":"2015-06-08T00:36:41Z","updated_at":"2016-03-11T20:41:27Z","pushed_at":"2016-03-12T04:35:07Z","git_url":"git://github.com/xenolf/lego.git","ssh_url":"git@github.com:xenolf/lego.git","clone_url":"https://github.com/xenolf/lego.git","svn_url":"https://github.com/xenolf/lego","homepage":"","size":468,"stargazers_count":987,"watchers_count":987,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":24,"forks":63,"open_issues":24,"watchers":987,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xenolf/lego/pulls/148"},"html":{"href":"https://github.com/xenolf/lego/pull/148"},"issue":{"href":"https://api.github.com/repos/xenolf/lego/issues/148"},"comments":{"href":"https://api.github.com/repos/xenolf/lego/issues/148/comments"},"review_comments":{"href":"https://api.github.com/repos/xenolf/lego/pulls/148/comments"},"review_comment":{"href":"https://api.github.com/repos/xenolf/lego/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xenolf/lego/pulls/148/commits"},"statuses":{"href":"https://api.github.com/repos/xenolf/lego/statuses/0a9c60cb824a1bca09afec560efed5be4bb9bcb2"}}}}