{"action":"created","comment":{"url":"https://api.github.com/repos/spotify/gordon-gcp/pulls/comments/185216534","pull_request_review_id":116559895,"id":185216534,"diff_hunk":"@@ -95,15 +92,96 @@ def __init__(self, auth_client=None, session=None):\n             body (obj): (optional) A dictionary, bytes, or file-like\n                 object to send in the body of the request.\n             headers (dict): (optional) HTTP headers to send with the\n-                request. Headers pass through to the request will\n+                request. Headers passed through to the request will\n                 include :attr:`DEFAULT_REQUEST_HEADERS`.\n+            retry_type (str): (optional) The type of retries to use: \"none\",\n+                \"simple\", (retry up to tries/timeout), \"no4xx\" (don't retry\n+                on 4xx, otherwise up to tries/timeout), or \"custom\".  If\n+                \"custom\", uses the retry predicate specified in the other\n+                parameters.  See also extra_401_retry.\n+            tries (int): (optional) Total maximum number of times to try the\n+                request, including the first (i.e. 1 == no retries).  The number\n+                of actual tries is subject to retry_type and timeout as well as\n+                this value.\n+            timeout (int): (optional) Total maximum seconds to keep trying the\n+                request (None == unlimited).  The number of actual tries is\n+                subject to retry_type and tries as well as this value.\n+            retry_predicate (callable): (optional) Function to call to decide\n+                if we should keep trying the request.  Ignored unless\n+                retry_type is \"custom\".  Must return True for \"continue retrying\n+                (subject to tries and timeout)\" or False for \"stop retrying\".\n+                Last argument must be the response from _request().  If the\n+                function takes any other arguments, their values must be\n+                supplied in predicate_args and/or predicate_kwargs.\n+            predicate_args (list): (optional) See retry_predicate.\n+            predicate_kwargs (dict): (optional) See retry_predicate.\n+            extra_401_retry (bool): (optional) If True, run one more request\n+                attempt on a 401 (unauthorized), regardless of the value of\n+                retry_type.  This makes sure we've tried generating a new token.","path":"src/gordon_gcp/clients/http.py","position":81,"original_position":81,"commit_id":"e68f7e9516bd5f1762e9abf583b1f6529a6c6caf","original_commit_id":"e68f7e9516bd5f1762e9abf583b1f6529a6c6caf","user":{"login":"matt0bi","id":33331579,"avatar_url":"https://avatars3.githubusercontent.com/u/33331579?v=4","gravatar_id":"","url":"https://api.github.com/users/matt0bi","html_url":"https://github.com/matt0bi","followers_url":"https://api.github.com/users/matt0bi/followers","following_url":"https://api.github.com/users/matt0bi/following{/other_user}","gists_url":"https://api.github.com/users/matt0bi/gists{/gist_id}","starred_url":"https://api.github.com/users/matt0bi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt0bi/subscriptions","organizations_url":"https://api.github.com/users/matt0bi/orgs","repos_url":"https://api.github.com/users/matt0bi/repos","events_url":"https://api.github.com/users/matt0bi/events{/privacy}","received_events_url":"https://api.github.com/users/matt0bi/received_events","type":"User","site_admin":false},"body":"I think this idea is pretty good. I know some other libraries that do a lot of args/kwargs (mock, async-ssh, paramiko) and using them even for simple cases has me looking up the docs almost every time.","created_at":"2018-05-01T13:04:12Z","updated_at":"2018-05-01T13:09:31Z","html_url":"https://github.com/spotify/gordon-gcp/pull/13#discussion_r185216534","pull_request_url":"https://api.github.com/repos/spotify/gordon-gcp/pulls/13","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/spotify/gordon-gcp/pulls/comments/185216534"},"html":{"href":"https://github.com/spotify/gordon-gcp/pull/13#discussion_r185216534"},"pull_request":{"href":"https://api.github.com/repos/spotify/gordon-gcp/pulls/13"}},"in_reply_to_id":185207247},"pull_request":{"url":"https://api.github.com/repos/spotify/gordon-gcp/pulls/13","id":184701877,"html_url":"https://github.com/spotify/gordon-gcp/pull/13","diff_url":"https://github.com/spotify/gordon-gcp/pull/13.diff","patch_url":"https://github.com/spotify/gordon-gcp/pull/13.patch","issue_url":"https://api.github.com/repos/spotify/gordon-gcp/issues/13","number":13,"state":"open","locked":false,"title":"RFC: Alf 5213 http retry","user":{"login":"ocsw","id":3641660,"avatar_url":"https://avatars0.githubusercontent.com/u/3641660?v=4","gravatar_id":"","url":"https://api.github.com/users/ocsw","html_url":"https://github.com/ocsw","followers_url":"https://api.github.com/users/ocsw/followers","following_url":"https://api.github.com/users/ocsw/following{/other_user}","gists_url":"https://api.github.com/users/ocsw/gists{/gist_id}","starred_url":"https://api.github.com/users/ocsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocsw/subscriptions","organizations_url":"https://api.github.com/users/ocsw/orgs","repos_url":"https://api.github.com/users/ocsw/repos","events_url":"https://api.github.com/users/ocsw/events{/privacy}","received_events_url":"https://api.github.com/users/ocsw/received_events","type":"User","site_admin":false},"body":"<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines <https://github.com/spotify/gordon-gcp/blob/master/CONTRIBUTING.rst>\r\n2. If the PR is unfinished, please prefix the subject line with [WIP], [DRAFT], or [RFC].\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\n\r\n**Which issue(s) this PR fixes** \r\n<!-- optional; in `fixes #<issue number>, fixes #<issue_number>, ...` format, will close the issue(s) when PR gets merged: -->\r\nFixes #\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, start the release note with the string \"action required: \".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\n\r\n```\r\n\r\n@spotify/alf no tests yet, and I'm going to add more logging, but this is the basic idea.","created_at":"2018-04-27T19:00:07Z","updated_at":"2018-05-01T13:09:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3faab33bf826678da79f6bcdb5b1ddf27bffeb28","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/spotify/gordon-gcp/pulls/13/commits","review_comments_url":"https://api.github.com/repos/spotify/gordon-gcp/pulls/13/comments","review_comment_url":"https://api.github.com/repos/spotify/gordon-gcp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spotify/gordon-gcp/issues/13/comments","statuses_url":"https://api.github.com/repos/spotify/gordon-gcp/statuses/e68f7e9516bd5f1762e9abf583b1f6529a6c6caf","head":{"label":"spotify:ALF-5213-HTTP-retry","ref":"ALF-5213-HTTP-retry","sha":"e68f7e9516bd5f1762e9abf583b1f6529a6c6caf","user":{"login":"spotify","id":251374,"avatar_url":"https://avatars2.githubusercontent.com/u/251374?v=4","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"repo":{"id":115427246,"name":"gordon-gcp","full_name":"spotify/gordon-gcp","owner":{"login":"spotify","id":251374,"avatar_url":"https://avatars2.githubusercontent.com/u/251374?v=4","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spotify/gordon-gcp","description":"GCP Plugin for Gordon: Event-driven Cloud DNS","fork":false,"url":"https://api.github.com/repos/spotify/gordon-gcp","forks_url":"https://api.github.com/repos/spotify/gordon-gcp/forks","keys_url":"https://api.github.com/repos/spotify/gordon-gcp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spotify/gordon-gcp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spotify/gordon-gcp/teams","hooks_url":"https://api.github.com/repos/spotify/gordon-gcp/hooks","issue_events_url":"https://api.github.com/repos/spotify/gordon-gcp/issues/events{/number}","events_url":"https://api.github.com/repos/spotify/gordon-gcp/events","assignees_url":"https://api.github.com/repos/spotify/gordon-gcp/assignees{/user}","branches_url":"https://api.github.com/repos/spotify/gordon-gcp/branches{/branch}","tags_url":"https://api.github.com/repos/spotify/gordon-gcp/tags","blobs_url":"https://api.github.com/repos/spotify/gordon-gcp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spotify/gordon-gcp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spotify/gordon-gcp/git/refs{/sha}","trees_url":"https://api.github.com/repos/spotify/gordon-gcp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spotify/gordon-gcp/statuses/{sha}","languages_url":"https://api.github.com/repos/spotify/gordon-gcp/languages","stargazers_url":"https://api.github.com/repos/spotify/gordon-gcp/stargazers","contributors_url":"https://api.github.com/repos/spotify/gordon-gcp/contributors","subscribers_url":"https://api.github.com/repos/spotify/gordon-gcp/subscribers","subscription_url":"https://api.github.com/repos/spotify/gordon-gcp/subscription","commits_url":"https://api.github.com/repos/spotify/gordon-gcp/commits{/sha}","git_commits_url":"https://api.github.com/repos/spotify/gordon-gcp/git/commits{/sha}","comments_url":"https://api.github.com/repos/spotify/gordon-gcp/comments{/number}","issue_comment_url":"https://api.github.com/repos/spotify/gordon-gcp/issues/comments{/number}","contents_url":"https://api.github.com/repos/spotify/gordon-gcp/contents/{+path}","compare_url":"https://api.github.com/repos/spotify/gordon-gcp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spotify/gordon-gcp/merges","archive_url":"https://api.github.com/repos/spotify/gordon-gcp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spotify/gordon-gcp/downloads","issues_url":"https://api.github.com/repos/spotify/gordon-gcp/issues{/number}","pulls_url":"https://api.github.com/repos/spotify/gordon-gcp/pulls{/number}","milestones_url":"https://api.github.com/repos/spotify/gordon-gcp/milestones{/number}","notifications_url":"https://api.github.com/repos/spotify/gordon-gcp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spotify/gordon-gcp/labels{/name}","releases_url":"https://api.github.com/repos/spotify/gordon-gcp/releases{/id}","deployments_url":"https://api.github.com/repos/spotify/gordon-gcp/deployments","created_at":"2017-12-26T14:04:47Z","updated_at":"2018-04-25T16:30:50Z","pushed_at":"2018-04-30T21:26:25Z","git_url":"git://github.com/spotify/gordon-gcp.git","ssh_url":"git@github.com:spotify/gordon-gcp.git","clone_url":"https://github.com/spotify/gordon-gcp.git","svn_url":"https://github.com/spotify/gordon-gcp","homepage":null,"size":193,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"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"},"forks":0,"open_issues":2,"watchers":3,"default_branch":"develop"}},"base":{"label":"spotify:develop","ref":"develop","sha":"b7b31c7fb360130b1a9a8e18be4b5658dddafe10","user":{"login":"spotify","id":251374,"avatar_url":"https://avatars2.githubusercontent.com/u/251374?v=4","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"repo":{"id":115427246,"name":"gordon-gcp","full_name":"spotify/gordon-gcp","owner":{"login":"spotify","id":251374,"avatar_url":"https://avatars2.githubusercontent.com/u/251374?v=4","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spotify/gordon-gcp","description":"GCP Plugin for Gordon: Event-driven Cloud DNS","fork":false,"url":"https://api.github.com/repos/spotify/gordon-gcp","forks_url":"https://api.github.com/repos/spotify/gordon-gcp/forks","keys_url":"https://api.github.com/repos/spotify/gordon-gcp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spotify/gordon-gcp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spotify/gordon-gcp/teams","hooks_url":"https://api.github.com/repos/spotify/gordon-gcp/hooks","issue_events_url":"https://api.github.com/repos/spotify/gordon-gcp/issues/events{/number}","events_url":"https://api.github.com/repos/spotify/gordon-gcp/events","assignees_url":"https://api.github.com/repos/spotify/gordon-gcp/assignees{/user}","branches_url":"https://api.github.com/repos/spotify/gordon-gcp/branches{/branch}","tags_url":"https://api.github.com/repos/spotify/gordon-gcp/tags","blobs_url":"https://api.github.com/repos/spotify/gordon-gcp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spotify/gordon-gcp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spotify/gordon-gcp/git/refs{/sha}","trees_url":"https://api.github.com/repos/spotify/gordon-gcp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spotify/gordon-gcp/statuses/{sha}","languages_url":"https://api.github.com/repos/spotify/gordon-gcp/languages","stargazers_url":"https://api.github.com/repos/spotify/gordon-gcp/stargazers","contributors_url":"https://api.github.com/repos/spotify/gordon-gcp/contributors","subscribers_url":"https://api.github.com/repos/spotify/gordon-gcp/subscribers","subscription_url":"https://api.github.com/repos/spotify/gordon-gcp/subscription","commits_url":"https://api.github.com/repos/spotify/gordon-gcp/commits{/sha}","git_commits_url":"https://api.github.com/repos/spotify/gordon-gcp/git/commits{/sha}","comments_url":"https://api.github.com/repos/spotify/gordon-gcp/comments{/number}","issue_comment_url":"https://api.github.com/repos/spotify/gordon-gcp/issues/comments{/number}","contents_url":"https://api.github.com/repos/spotify/gordon-gcp/contents/{+path}","compare_url":"https://api.github.com/repos/spotify/gordon-gcp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spotify/gordon-gcp/merges","archive_url":"https://api.github.com/repos/spotify/gordon-gcp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spotify/gordon-gcp/downloads","issues_url":"https://api.github.com/repos/spotify/gordon-gcp/issues{/number}","pulls_url":"https://api.github.com/repos/spotify/gordon-gcp/pulls{/number}","milestones_url":"https://api.github.com/repos/spotify/gordon-gcp/milestones{/number}","notifications_url":"https://api.github.com/repos/spotify/gordon-gcp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spotify/gordon-gcp/labels{/name}","releases_url":"https://api.github.com/repos/spotify/gordon-gcp/releases{/id}","deployments_url":"https://api.github.com/repos/spotify/gordon-gcp/deployments","created_at":"2017-12-26T14:04:47Z","updated_at":"2018-04-25T16:30:50Z","pushed_at":"2018-04-30T21:26:25Z","git_url":"git://github.com/spotify/gordon-gcp.git","ssh_url":"git@github.com:spotify/gordon-gcp.git","clone_url":"https://github.com/spotify/gordon-gcp.git","svn_url":"https://github.com/spotify/gordon-gcp","homepage":null,"size":193,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"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"},"forks":0,"open_issues":2,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/spotify/gordon-gcp/pulls/13"},"html":{"href":"https://github.com/spotify/gordon-gcp/pull/13"},"issue":{"href":"https://api.github.com/repos/spotify/gordon-gcp/issues/13"},"comments":{"href":"https://api.github.com/repos/spotify/gordon-gcp/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/spotify/gordon-gcp/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/spotify/gordon-gcp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spotify/gordon-gcp/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/spotify/gordon-gcp/statuses/e68f7e9516bd5f1762e9abf583b1f6529a6c6caf"}},"author_association":"NONE"}}
{"actor":{"display_login":"matt0bi"}}