payload: {"action":"created","comment":{"url":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/comments/335684713","pull_request_review_id":302845384,"id":335684713,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzNTY4NDcxMw==","diff_hunk":"@@ -258,23 +258,72 @@ def _serialize(o) -> bytes:\n     return o.SerializeToString()\n \n \n+NUMBER_OF_RETRIES = 5\n+\n+# Initial delay in seconds before an attempt to retry\n+INITIAL_DELAY = 0.3\n+\n+\n+def retry_wrapper(function, *args):\n+    delay = INITIAL_DELAY\n+    for i in range(NUMBER_OF_RETRIES):\n+        try:\n+            return function(*args)\n+        except _Rendezvous as e:\n+            if e.code() == grpc.StatusCode.UNAVAILABLE and i < NUMBER_OF_RETRIES - 1:\n+                logging.warning(f\"Retrying after {e} in {delay} seconds\")\n+                time.sleep(delay)\n+                delay += delay","path":"integration-testing/client/CasperLabsClient/casperlabs_client/casperlabs_client.py","position":19,"original_position":19,"commit_id":"249f9b4397dea538af02f9a3cd3acaf5b7b4e905","original_commit_id":"d82e26082bfdc799091f1420fd59c4f076687098","user":{"login":"sacherjj","id":321623,"node_id":"MDQ6VXNlcjMyMTYyMw==","avatar_url":"https://avatars1.githubusercontent.com/u/321623?v=4","gravatar_id":"","url":"https://api.github.com/users/sacherjj","html_url":"https://github.com/sacherjj","followers_url":"https://api.github.com/users/sacherjj/followers","following_url":"https://api.github.com/users/sacherjj/following{/other_user}","gists_url":"https://api.github.com/users/sacherjj/gists{/gist_id}","starred_url":"https://api.github.com/users/sacherjj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sacherjj/subscriptions","organizations_url":"https://api.github.com/users/sacherjj/orgs","repos_url":"https://api.github.com/users/sacherjj/repos","events_url":"https://api.github.com/users/sacherjj/events{/privacy}","received_events_url":"https://api.github.com/users/sacherjj/received_events","type":"User","site_admin":false},"body":"I wouldn't have thought to double the delay each time.  But thinking about it, most likely case is first retry from what we have seen.  This reduces load if something is really slow.  A good idea.","created_at":"2019-10-16T20:10:34Z","updated_at":"2019-10-16T20:10:34Z","html_url":"https://github.com/CasperLabs/CasperLabs/pull/1264#discussion_r335684713","pull_request_url":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/1264","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/comments/335684713"},"html":{"href":"https://github.com/CasperLabs/CasperLabs/pull/1264#discussion_r335684713"},"pull_request":{"href":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/1264"}}},"pull_request":{"url":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/1264","id":328916789,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI4OTE2Nzg5","html_url":"https://github.com/CasperLabs/CasperLabs/pull/1264","diff_url":"https://github.com/CasperLabs/CasperLabs/pull/1264.diff","patch_url":"https://github.com/CasperLabs/CasperLabs/pull/1264.patch","issue_url":"https://api.github.com/repos/CasperLabs/CasperLabs/issues/1264","number":1264,"state":"open","locked":false,"title":"NODE-853: Fix PythonClient in the test ramework.","user":{"login":"piokuc","id":482529,"node_id":"MDQ6VXNlcjQ4MjUyOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/482529?v=4","gravatar_id":"","url":"https://api.github.com/users/piokuc","html_url":"https://github.com/piokuc","followers_url":"https://api.github.com/users/piokuc/followers","following_url":"https://api.github.com/users/piokuc/following{/other_user}","gists_url":"https://api.github.com/users/piokuc/gists{/gist_id}","starred_url":"https://api.github.com/users/piokuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piokuc/subscriptions","organizations_url":"https://api.github.com/users/piokuc/orgs","repos_url":"https://api.github.com/users/piokuc/repos","events_url":"https://api.github.com/users/piokuc/events{/privacy}","received_events_url":"https://api.github.com/users/piokuc/received_events","type":"User","site_admin":false},"body":"### Overview\r\nFix a bug in PythonClient in the test framework. The class had a couple of instances of the CasperLabsClient (the Python client), one uninitialized with correct node address details.\r\n\r\nAt some point, perhaps as a result of some imports cleaning, the class PythonClient became derived from CasperLabsClient from the client package, rather than CasperLabsClient from the test framework. Thus it became possible to call methods of the client, the new base class, directly. Unfortunately the base object was not initialized correctly, so this way of calling client's methods was failing in drone, where `127.0.0.1` was not a valid address.\r\n\r\nThe base class of PythonClient and DockerClient has been renamed to CasperLabsClientBase to avoid confusion.\r\n\r\nAdditionally, Python client has now a retry mechanism implemented, so it will retry connecting to node few times in case of gRPC `UNAVAILABLE` exception.\r\n\r\n### Which JIRA ticket does this PR relate to?\r\nhttps://casperlabs.atlassian.net/browse/NODE-853\r\n\r\n### Complete this checklist before you submit this PR\r\n- [ ] This PR contains no more than 200 lines of code, excluding test code.\r\n- [ ] This PR meets [CasperLabs coding standards](https://casperlabs.atlassian.net/wiki/spaces/EN/pages/16842753/Coding+Standards).\r\n- [ ] If this PR adds a new feature, it includes tests related to this feature.\r\n- [ ] You assigned one person to review this PR.\r\n- [ ] Your GitHub account is linked with our [Drone CI](https://drone-auto.casperlabs.io/) system. This is necessary to run tests on this PR.\r\n- [ ] Do not forget to run `bors r+` if GitHub policy is not enforced, e.g. when merging into another feature branch. It may be omitted under some circumstances if this PR intentionally assumes that integration tests will fail but will be fixed with the future PRs.\r\n\r\n### Notes\r\n_Optional. Add any notes on caveats, approaches you tried that didn't work, or anything else._\r\n","created_at":"2019-10-16T19:19:16Z","updated_at":"2019-10-16T20:10:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08853929f2ab4f9a1afa16beb4c05befda4c621e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"aakoshh","id":2684603,"node_id":"MDQ6VXNlcjI2ODQ2MDM=","avatar_url":"https://avatars1.githubusercontent.com/u/2684603?v=4","gravatar_id":"","url":"https://api.github.com/users/aakoshh","html_url":"https://github.com/aakoshh","followers_url":"https://api.github.com/users/aakoshh/followers","following_url":"https://api.github.com/users/aakoshh/following{/other_user}","gists_url":"https://api.github.com/users/aakoshh/gists{/gist_id}","starred_url":"https://api.github.com/users/aakoshh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aakoshh/subscriptions","organizations_url":"https://api.github.com/users/aakoshh/orgs","repos_url":"https://api.github.com/users/aakoshh/repos","events_url":"https://api.github.com/users/aakoshh/events{/privacy}","received_events_url":"https://api.github.com/users/aakoshh/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/1264/commits","review_comments_url":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/1264/comments","review_comment_url":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CasperLabs/CasperLabs/issues/1264/comments","statuses_url":"https://api.github.com/repos/CasperLabs/CasperLabs/statuses/249f9b4397dea538af02f9a3cd3acaf5b7b4e905","head":{"label":"piokuc:piotr/NODE-853","ref":"piotr/NODE-853","sha":"249f9b4397dea538af02f9a3cd3acaf5b7b4e905","user":{"login":"piokuc","id":482529,"node_id":"MDQ6VXNlcjQ4MjUyOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/482529?v=4","gravatar_id":"","url":"https://api.github.com/users/piokuc","html_url":"https://github.com/piokuc","followers_url":"https://api.github.com/users/piokuc/followers","following_url":"https://api.github.com/users/piokuc/following{/other_user}","gists_url":"https://api.github.com/users/piokuc/gists{/gist_id}","starred_url":"https://api.github.com/users/piokuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piokuc/subscriptions","organizations_url":"https://api.github.com/users/piokuc/orgs","repos_url":"https://api.github.com/users/piokuc/repos","events_url":"https://api.github.com/users/piokuc/events{/privacy}","received_events_url":"https://api.github.com/users/piokuc/received_events","type":"User","site_admin":false},"repo":{"id":191935472,"node_id":"MDEwOlJlcG9zaXRvcnkxOTE5MzU0NzI=","name":"CasperLabs","full_name":"piokuc/CasperLabs","private":false,"owner":{"login":"piokuc","id":482529,"node_id":"MDQ6VXNlcjQ4MjUyOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/482529?v=4","gravatar_id":"","url":"https://api.github.com/users/piokuc","html_url":"https://github.com/piokuc","followers_url":"https://api.github.com/users/piokuc/followers","following_url":"https://api.github.com/users/piokuc/following{/other_user}","gists_url":"https://api.github.com/users/piokuc/gists{/gist_id}","starred_url":"https://api.github.com/users/piokuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piokuc/subscriptions","organizations_url":"https://api.github.com/users/piokuc/orgs","repos_url":"https://api.github.com/users/piokuc/repos","events_url":"https://api.github.com/users/piokuc/events{/privacy}","received_events_url":"https://api.github.com/users/piokuc/received_events","type":"User","site_admin":false},"html_url":"https://github.com/piokuc/CasperLabs","description":"CasperLabs Core","fork":true,"url":"https://api.github.com/repos/piokuc/CasperLabs","forks_url":"https://api.github.com/repos/piokuc/CasperLabs/forks","keys_url":"https://api.github.com/repos/piokuc/CasperLabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piokuc/CasperLabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piokuc/CasperLabs/teams","hooks_url":"https://api.github.com/repos/piokuc/CasperLabs/hooks","issue_events_url":"https://api.github.com/repos/piokuc/CasperLabs/issues/events{/number}","events_url":"https://api.github.com/repos/piokuc/CasperLabs/events","assignees_url":"https://api.github.com/repos/piokuc/CasperLabs/assignees{/user}","branches_url":"https://api.github.com/repos/piokuc/CasperLabs/branches{/branch}","tags_url":"https://api.github.com/repos/piokuc/CasperLabs/tags","blobs_url":"https://api.github.com/repos/piokuc/CasperLabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piokuc/CasperLabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piokuc/CasperLabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/piokuc/CasperLabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piokuc/CasperLabs/statuses/{sha}","languages_url":"https://api.github.com/repos/piokuc/CasperLabs/languages","stargazers_url":"https://api.github.com/repos/piokuc/CasperLabs/stargazers","contributors_url":"https://api.github.com/repos/piokuc/CasperLabs/contributors","subscribers_url":"https://api.github.com/repos/piokuc/CasperLabs/subscribers","subscription_url":"https://api.github.com/repos/piokuc/CasperLabs/subscription","commits_url":"https://api.github.com/repos/piokuc/CasperLabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/piokuc/CasperLabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/piokuc/CasperLabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/piokuc/CasperLabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/piokuc/CasperLabs/contents/{+path}","compare_url":"https://api.github.com/repos/piokuc/CasperLabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piokuc/CasperLabs/merges","archive_url":"https://api.github.com/repos/piokuc/CasperLabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piokuc/CasperLabs/downloads","issues_url":"https://api.github.com/repos/piokuc/CasperLabs/issues{/number}","pulls_url":"https://api.github.com/repos/piokuc/CasperLabs/pulls{/number}","milestones_url":"https://api.github.com/repos/piokuc/CasperLabs/milestones{/number}","notifications_url":"https://api.github.com/repos/piokuc/CasperLabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piokuc/CasperLabs/labels{/name}","releases_url":"https://api.github.com/repos/piokuc/CasperLabs/releases{/id}","deployments_url":"https://api.github.com/repos/piokuc/CasperLabs/deployments","created_at":"2019-06-14T11:57:36Z","updated_at":"2019-10-16T19:20:50Z","pushed_at":"2019-10-16T19:56:23Z","git_url":"git://github.com/piokuc/CasperLabs.git","ssh_url":"git@github.com:piokuc/CasperLabs.git","clone_url":"https://github.com/piokuc/CasperLabs.git","svn_url":"https://github.com/piokuc/CasperLabs","homepage":"","size":21486,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"CasperLabs:dev","ref":"dev","sha":"3093e3c7b515fa0a5c62e5b3e13ac19a28521057","user":{"login":"CasperLabs","id":44785362,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0Nzg1MzYy","avatar_url":"https://avatars0.githubusercontent.com/u/44785362?v=4","gravatar_id":"","url":"https://api.github.com/users/CasperLabs","html_url":"https://github.com/CasperLabs","followers_url":"https://api.github.com/users/CasperLabs/followers","following_url":"https://api.github.com/users/CasperLabs/following{/other_user}","gists_url":"https://api.github.com/users/CasperLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/CasperLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CasperLabs/subscriptions","organizations_url":"https://api.github.com/users/CasperLabs/orgs","repos_url":"https://api.github.com/users/CasperLabs/repos","events_url":"https://api.github.com/users/CasperLabs/events{/privacy}","received_events_url":"https://api.github.com/users/CasperLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":160243933,"node_id":"MDEwOlJlcG9zaXRvcnkxNjAyNDM5MzM=","name":"CasperLabs","full_name":"CasperLabs/CasperLabs","private":false,"owner":{"login":"CasperLabs","id":44785362,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0Nzg1MzYy","avatar_url":"https://avatars0.githubusercontent.com/u/44785362?v=4","gravatar_id":"","url":"https://api.github.com/users/CasperLabs","html_url":"https://github.com/CasperLabs","followers_url":"https://api.github.com/users/CasperLabs/followers","following_url":"https://api.github.com/users/CasperLabs/following{/other_user}","gists_url":"https://api.github.com/users/CasperLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/CasperLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CasperLabs/subscriptions","organizations_url":"https://api.github.com/users/CasperLabs/orgs","repos_url":"https://api.github.com/users/CasperLabs/repos","events_url":"https://api.github.com/users/CasperLabs/events{/privacy}","received_events_url":"https://api.github.com/users/CasperLabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/CasperLabs/CasperLabs","description":"CasperLabs Core","fork":false,"url":"https://api.github.com/repos/CasperLabs/CasperLabs","forks_url":"https://api.github.com/repos/CasperLabs/CasperLabs/forks","keys_url":"https://api.github.com/repos/CasperLabs/CasperLabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CasperLabs/CasperLabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CasperLabs/CasperLabs/teams","hooks_url":"https://api.github.com/repos/CasperLabs/CasperLabs/hooks","issue_events_url":"https://api.github.com/repos/CasperLabs/CasperLabs/issues/events{/number}","events_url":"https://api.github.com/repos/CasperLabs/CasperLabs/events","assignees_url":"https://api.github.com/repos/CasperLabs/CasperLabs/assignees{/user}","branches_url":"https://api.github.com/repos/CasperLabs/CasperLabs/branches{/branch}","tags_url":"https://api.github.com/repos/CasperLabs/CasperLabs/tags","blobs_url":"https://api.github.com/repos/CasperLabs/CasperLabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CasperLabs/CasperLabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CasperLabs/CasperLabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/CasperLabs/CasperLabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CasperLabs/CasperLabs/statuses/{sha}","languages_url":"https://api.github.com/repos/CasperLabs/CasperLabs/languages","stargazers_url":"https://api.github.com/repos/CasperLabs/CasperLabs/stargazers","contributors_url":"https://api.github.com/repos/CasperLabs/CasperLabs/contributors","subscribers_url":"https://api.github.com/repos/CasperLabs/CasperLabs/subscribers","subscription_url":"https://api.github.com/repos/CasperLabs/CasperLabs/subscription","commits_url":"https://api.github.com/repos/CasperLabs/CasperLabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/CasperLabs/CasperLabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/CasperLabs/CasperLabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/CasperLabs/CasperLabs/issues/comments{/number}","contents_url":"https://api.github.com/repos/CasperLabs/CasperLabs/contents/{+path}","compare_url":"https://api.github.com/repos/CasperLabs/CasperLabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CasperLabs/CasperLabs/merges","archive_url":"https://api.github.com/repos/CasperLabs/CasperLabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CasperLabs/CasperLabs/downloads","issues_url":"https://api.github.com/repos/CasperLabs/CasperLabs/issues{/number}","pulls_url":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls{/number}","milestones_url":"https://api.github.com/repos/CasperLabs/CasperLabs/milestones{/number}","notifications_url":"https://api.github.com/repos/CasperLabs/CasperLabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CasperLabs/CasperLabs/labels{/name}","releases_url":"https://api.github.com/repos/CasperLabs/CasperLabs/releases{/id}","deployments_url":"https://api.github.com/repos/CasperLabs/CasperLabs/deployments","created_at":"2018-12-03T19:39:20Z","updated_at":"2019-10-16T18:57:35Z","pushed_at":"2019-10-16T19:56:24Z","git_url":"git://github.com/CasperLabs/CasperLabs.git","ssh_url":"git@github.com:CasperLabs/CasperLabs.git","clone_url":"https://github.com/CasperLabs/CasperLabs.git","svn_url":"https://github.com/CasperLabs/CasperLabs","homepage":"","size":52811,"stargazers_count":66,"watchers_count":66,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":35,"open_issues":11,"watchers":66,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/1264"},"html":{"href":"https://github.com/CasperLabs/CasperLabs/pull/1264"},"issue":{"href":"https://api.github.com/repos/CasperLabs/CasperLabs/issues/1264"},"comments":{"href":"https://api.github.com/repos/CasperLabs/CasperLabs/issues/1264/comments"},"review_comments":{"href":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/1264/comments"},"review_comment":{"href":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CasperLabs/CasperLabs/pulls/1264/commits"},"statuses":{"href":"https://api.github.com/repos/CasperLabs/CasperLabs/statuses/249f9b4397dea538af02f9a3cd3acaf5b7b4e905"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"sacherjj"}}