payload: {"action":"created","issue":{"url":"https://api.github.com/repos/data61/clkhash/issues/277","repository_url":"https://api.github.com/repos/data61/clkhash","labels_url":"https://api.github.com/repos/data61/clkhash/issues/277/labels{/name}","comments_url":"https://api.github.com/repos/data61/clkhash/issues/277/comments","events_url":"https://api.github.com/repos/data61/clkhash/issues/277/events","html_url":"https://github.com/data61/clkhash/pull/277","id":465089201,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk1MjAyNjcz","number":277,"title":"The client retry its requests if receiving a `RateLimitedClient` error.","user":{"login":"gusmith","id":10216186,"node_id":"MDQ6VXNlcjEwMjE2MTg2","avatar_url":"https://avatars3.githubusercontent.com/u/10216186?v=4","gravatar_id":"","url":"https://api.github.com/users/gusmith","html_url":"https://github.com/gusmith","followers_url":"https://api.github.com/users/gusmith/followers","following_url":"https://api.github.com/users/gusmith/following{/other_user}","gists_url":"https://api.github.com/users/gusmith/gists{/gist_id}","starred_url":"https://api.github.com/users/gusmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gusmith/subscriptions","organizations_url":"https://api.github.com/users/gusmith/orgs","repos_url":"https://api.github.com/users/gusmith/repos","events_url":"https://api.github.com/users/gusmith/events{/privacy}","received_events_url":"https://api.github.com/users/gusmith/received_events","type":"User","site_admin":false},"labels":[{"id":639457385,"node_id":"MDU6TGFiZWw2Mzk0NTczODU=","url":"https://api.github.com/repos/data61/clkhash/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"gusmith","id":10216186,"node_id":"MDQ6VXNlcjEwMjE2MTg2","avatar_url":"https://avatars3.githubusercontent.com/u/10216186?v=4","gravatar_id":"","url":"https://api.github.com/users/gusmith","html_url":"https://github.com/gusmith","followers_url":"https://api.github.com/users/gusmith/followers","following_url":"https://api.github.com/users/gusmith/following{/other_user}","gists_url":"https://api.github.com/users/gusmith/gists{/gist_id}","starred_url":"https://api.github.com/users/gusmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gusmith/subscriptions","organizations_url":"https://api.github.com/users/gusmith/orgs","repos_url":"https://api.github.com/users/gusmith/repos","events_url":"https://api.github.com/users/gusmith/events{/privacy}","received_events_url":"https://api.github.com/users/gusmith/received_events","type":"User","site_admin":false},"assignees":[{"login":"gusmith","id":10216186,"node_id":"MDQ6VXNlcjEwMjE2MTg2","avatar_url":"https://avatars3.githubusercontent.com/u/10216186?v=4","gravatar_id":"","url":"https://api.github.com/users/gusmith","html_url":"https://github.com/gusmith","followers_url":"https://api.github.com/users/gusmith/followers","following_url":"https://api.github.com/users/gusmith/following{/other_user}","gists_url":"https://api.github.com/users/gusmith/gists{/gist_id}","starred_url":"https://api.github.com/users/gusmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gusmith/subscriptions","organizations_url":"https://api.github.com/users/gusmith/orgs","repos_url":"https://api.github.com/users/gusmith/repos","events_url":"https://api.github.com/users/gusmith/events{/privacy}","received_events_url":"https://api.github.com/users/gusmith/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2019-07-08T07:04:21Z","updated_at":"2019-07-09T09:26:29Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/data61/clkhash/pulls/277","html_url":"https://github.com/data61/clkhash/pull/277","diff_url":"https://github.com/data61/clkhash/pull/277.diff","patch_url":"https://github.com/data61/clkhash/pull/277.patch"},"body":"Fix #272 \r\n\r\nThe tests for the cli are relying on a real anonlink-entity-service to deployed. But the nginx proxy of the service is limiting the number of requests it will accept per second (limitation of request per second and burst of request).\r\n\r\nThe `clkhash` cli was not limiting anything and was not retrying on failure.\r\n\r\nTo solve this, we use the [`retrying`](https://pypi.org/project/retrying/) package. If a `RateLimitedClient` error is raised, the client will wait 1 second before retrying, and will retry up to 10 times."},"comment":{"url":"https://api.github.com/repos/data61/clkhash/issues/comments/509566169","html_url":"https://github.com/data61/clkhash/pull/277#issuecomment-509566169","issue_url":"https://api.github.com/repos/data61/clkhash/issues/277","id":509566169,"node_id":"MDEyOklzc3VlQ29tbWVudDUwOTU2NjE2OQ==","user":{"login":"gusmith","id":10216186,"node_id":"MDQ6VXNlcjEwMjE2MTg2","avatar_url":"https://avatars3.githubusercontent.com/u/10216186?v=4","gravatar_id":"","url":"https://api.github.com/users/gusmith","html_url":"https://github.com/gusmith","followers_url":"https://api.github.com/users/gusmith/followers","following_url":"https://api.github.com/users/gusmith/following{/other_user}","gists_url":"https://api.github.com/users/gusmith/gists{/gist_id}","starred_url":"https://api.github.com/users/gusmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gusmith/subscriptions","organizations_url":"https://api.github.com/users/gusmith/orgs","repos_url":"https://api.github.com/users/gusmith/repos","events_url":"https://api.github.com/users/gusmith/events{/privacy}","received_events_url":"https://api.github.com/users/gusmith/received_events","type":"User","site_admin":false},"created_at":"2019-07-09T09:26:29Z","updated_at":"2019-07-09T09:26:29Z","author_association":"CONTRIBUTOR","body":"More changes than expected... Mainly because of the comment:\r\n\r\n> wait_exponential_multiplier=100, wait_exponential_max=10000 (with the numbers being configurable)\r\n\r\nChanges:\r\n - create a class for the rest client to contain the server and the retrying configuration. In fact, it makes it cleaner while being able to configure the retrying parameters via the cli. I didn't wanted to use environment variable, because it was not consistent with the current usage of the library\r\n - retrying configuration uses exponential time growth instead of constant\r\n - fix a bug introduced by the retrying: when posting the clks, we are reading the data from a file (via `click.File`), so if we are retrying working on the same file, we will read empty value, so we need to reset the reading pointer to the beginning of the file\r\n - update all the tests to pass\r\n - reduce requirement restriction from retrying==1.3.3 to retrying>=1.3"}}
other: {"actor":{"display_login":"gusmith"}}