{"action":"created","comment":{"url":"https://api.github.com/repos/googleapis/gax-java/pulls/comments/223161417","pull_request_review_id":162229812,"id":223161417,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzE2MTQxNw==","diff_hunk":"@@ -0,0 +1,61 @@\n+/*\n+ * Copyright 2018 Google LLC\n+ *\n+ * Redistribution and use in source and binary forms, with or without\n+ * modification, are permitted provided that the following conditions are\n+ * met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ * notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above\n+ * copyright notice, this list of conditions and the following disclaimer\n+ * in the documentation and/or other materials provided with the\n+ * distribution.\n+ *     * Neither the name of Google LLC nor the names of its\n+ * contributors may be used to endorse or promote products derived from\n+ * this software without specific prior written permission.\n+ *\n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+package com.google.api.gax.retrying;\n+\n+import com.google.api.core.BetaApi;\n+import com.google.api.core.InternalExtensionOnly;\n+import java.util.concurrent.Callable;\n+import javax.annotation.Nonnull;\n+\n+/**\n+ * A retrying executor is responsible for the following operations:\n+ *\n+ * <ol>","path":"gax/src/main/java/com/google/api/gax/retrying/RetryingExecutorWithContext.java","position":40,"original_position":40,"commit_id":"209a8410295617bbc79515ec1e8673d13109f036","original_commit_id":"209a8410295617bbc79515ec1e8673d13109f036","user":{"login":"vam-google","id":25311427,"node_id":"MDQ6VXNlcjI1MzExNDI3","avatar_url":"https://avatars3.githubusercontent.com/u/25311427?v=4","gravatar_id":"","url":"https://api.github.com/users/vam-google","html_url":"https://github.com/vam-google","followers_url":"https://api.github.com/users/vam-google/followers","following_url":"https://api.github.com/users/vam-google/following{/other_user}","gists_url":"https://api.github.com/users/vam-google/gists{/gist_id}","starred_url":"https://api.github.com/users/vam-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vam-google/subscriptions","organizations_url":"https://api.github.com/users/vam-google/orgs","repos_url":"https://api.github.com/users/vam-google/repos","events_url":"https://api.github.com/users/vam-google/events{/privacy}","received_events_url":"https://api.github.com/users/vam-google/received_events","type":"User","site_admin":false},"body":"I think you can just reference the `RetryingExecutor`'s documentation here instead of copying it (via `@see` javadoc construct)","created_at":"2018-10-05T23:41:30Z","updated_at":"2018-10-05T23:48:17Z","html_url":"https://github.com/googleapis/gax-java/pull/590#discussion_r223161417","pull_request_url":"https://api.github.com/repos/googleapis/gax-java/pulls/590","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/googleapis/gax-java/pulls/comments/223161417"},"html":{"href":"https://github.com/googleapis/gax-java/pull/590#discussion_r223161417"},"pull_request":{"href":"https://api.github.com/repos/googleapis/gax-java/pulls/590"}}},"pull_request":{"url":"https://api.github.com/repos/googleapis/gax-java/pulls/590","id":220557889,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNTU3ODg5","html_url":"https://github.com/googleapis/gax-java/pull/590","diff_url":"https://github.com/googleapis/gax-java/pull/590.diff","patch_url":"https://github.com/googleapis/gax-java/pull/590.patch","issue_url":"https://api.github.com/repos/googleapis/gax-java/issues/590","number":590,"state":"open","locked":false,"title":"Add RetryingContext","user":{"login":"igorbernstein2","id":23526194,"node_id":"MDQ6VXNlcjIzNTI2MTk0","avatar_url":"https://avatars3.githubusercontent.com/u/23526194?v=4","gravatar_id":"","url":"https://api.github.com/users/igorbernstein2","html_url":"https://github.com/igorbernstein2","followers_url":"https://api.github.com/users/igorbernstein2/followers","following_url":"https://api.github.com/users/igorbernstein2/following{/other_user}","gists_url":"https://api.github.com/users/igorbernstein2/gists{/gist_id}","starred_url":"https://api.github.com/users/igorbernstein2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorbernstein2/subscriptions","organizations_url":"https://api.github.com/users/igorbernstein2/orgs","repos_url":"https://api.github.com/users/igorbernstein2/repos","events_url":"https://api.github.com/users/igorbernstein2/events{/privacy}","received_events_url":"https://api.github.com/users/igorbernstein2/received_events","type":"User","site_admin":false},"body":"This is the next iteration of #583.\r\n\r\nThis is the first step of opencensus integration. To enable tracing I need to inject state into `BasicRetryingFuture#handleAttempt`, unfortunately as it stands `RetryingExecutor` and thus `RetryingFutures` don't have access to per-operation state. This prevents retrying logic from annotating the current operation span. This PR remedies the situation by injecting state via a `RetryingContext` that is passed to`RetryingExecutor#createFuture`.\r\nUnfortunately `RetryingExecutor` interface is part of the public surface that has been finalized. To sidestep this issue, a new interface `RetryingExecutorWithContext` is introduced that inherits from `RetryingExecutor`. \r\n`RetryingExecutorWithContext` is meant to be a temporary solution. Once gax drops support for java 7, the new method can be pulled up to the `RetryingExecutor` interface with a a default implementation.\r\n\r\n","created_at":"2018-10-05T00:59:33Z","updated_at":"2018-10-05T23:48:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afaaa7a611fe372f1b2c5c20d7ba8a1226cf9586","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1062999456,"node_id":"MDU6TGFiZWwxMDYyOTk5NDU2","url":"https://api.github.com/repos/googleapis/gax-java/labels/cla:%20yes","name":"cla: yes","color":"0B7601","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/googleapis/gax-java/pulls/590/commits","review_comments_url":"https://api.github.com/repos/googleapis/gax-java/pulls/590/comments","review_comment_url":"https://api.github.com/repos/googleapis/gax-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/googleapis/gax-java/issues/590/comments","statuses_url":"https://api.github.com/repos/googleapis/gax-java/statuses/209a8410295617bbc79515ec1e8673d13109f036","head":{"label":"igorbernstein2:opencensus-0-retrycontext","ref":"opencensus-0-retrycontext","sha":"209a8410295617bbc79515ec1e8673d13109f036","user":{"login":"igorbernstein2","id":23526194,"node_id":"MDQ6VXNlcjIzNTI2MTk0","avatar_url":"https://avatars3.githubusercontent.com/u/23526194?v=4","gravatar_id":"","url":"https://api.github.com/users/igorbernstein2","html_url":"https://github.com/igorbernstein2","followers_url":"https://api.github.com/users/igorbernstein2/followers","following_url":"https://api.github.com/users/igorbernstein2/following{/other_user}","gists_url":"https://api.github.com/users/igorbernstein2/gists{/gist_id}","starred_url":"https://api.github.com/users/igorbernstein2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorbernstein2/subscriptions","organizations_url":"https://api.github.com/users/igorbernstein2/orgs","repos_url":"https://api.github.com/users/igorbernstein2/repos","events_url":"https://api.github.com/users/igorbernstein2/events{/privacy}","received_events_url":"https://api.github.com/users/igorbernstein2/received_events","type":"User","site_admin":false},"repo":{"id":109061626,"node_id":"MDEwOlJlcG9zaXRvcnkxMDkwNjE2MjY=","name":"gax-java","full_name":"igorbernstein2/gax-java","private":false,"owner":{"login":"igorbernstein2","id":23526194,"node_id":"MDQ6VXNlcjIzNTI2MTk0","avatar_url":"https://avatars3.githubusercontent.com/u/23526194?v=4","gravatar_id":"","url":"https://api.github.com/users/igorbernstein2","html_url":"https://github.com/igorbernstein2","followers_url":"https://api.github.com/users/igorbernstein2/followers","following_url":"https://api.github.com/users/igorbernstein2/following{/other_user}","gists_url":"https://api.github.com/users/igorbernstein2/gists{/gist_id}","starred_url":"https://api.github.com/users/igorbernstein2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorbernstein2/subscriptions","organizations_url":"https://api.github.com/users/igorbernstein2/orgs","repos_url":"https://api.github.com/users/igorbernstein2/repos","events_url":"https://api.github.com/users/igorbernstein2/events{/privacy}","received_events_url":"https://api.github.com/users/igorbernstein2/received_events","type":"User","site_admin":false},"html_url":"https://github.com/igorbernstein2/gax-java","description":"Google API Extensions for Java","fork":true,"url":"https://api.github.com/repos/igorbernstein2/gax-java","forks_url":"https://api.github.com/repos/igorbernstein2/gax-java/forks","keys_url":"https://api.github.com/repos/igorbernstein2/gax-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/igorbernstein2/gax-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/igorbernstein2/gax-java/teams","hooks_url":"https://api.github.com/repos/igorbernstein2/gax-java/hooks","issue_events_url":"https://api.github.com/repos/igorbernstein2/gax-java/issues/events{/number}","events_url":"https://api.github.com/repos/igorbernstein2/gax-java/events","assignees_url":"https://api.github.com/repos/igorbernstein2/gax-java/assignees{/user}","branches_url":"https://api.github.com/repos/igorbernstein2/gax-java/branches{/branch}","tags_url":"https://api.github.com/repos/igorbernstein2/gax-java/tags","blobs_url":"https://api.github.com/repos/igorbernstein2/gax-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/igorbernstein2/gax-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/igorbernstein2/gax-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/igorbernstein2/gax-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/igorbernstein2/gax-java/statuses/{sha}","languages_url":"https://api.github.com/repos/igorbernstein2/gax-java/languages","stargazers_url":"https://api.github.com/repos/igorbernstein2/gax-java/stargazers","contributors_url":"https://api.github.com/repos/igorbernstein2/gax-java/contributors","subscribers_url":"https://api.github.com/repos/igorbernstein2/gax-java/subscribers","subscription_url":"https://api.github.com/repos/igorbernstein2/gax-java/subscription","commits_url":"https://api.github.com/repos/igorbernstein2/gax-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/igorbernstein2/gax-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/igorbernstein2/gax-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/igorbernstein2/gax-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/igorbernstein2/gax-java/contents/{+path}","compare_url":"https://api.github.com/repos/igorbernstein2/gax-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/igorbernstein2/gax-java/merges","archive_url":"https://api.github.com/repos/igorbernstein2/gax-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/igorbernstein2/gax-java/downloads","issues_url":"https://api.github.com/repos/igorbernstein2/gax-java/issues{/number}","pulls_url":"https://api.github.com/repos/igorbernstein2/gax-java/pulls{/number}","milestones_url":"https://api.github.com/repos/igorbernstein2/gax-java/milestones{/number}","notifications_url":"https://api.github.com/repos/igorbernstein2/gax-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/igorbernstein2/gax-java/labels{/name}","releases_url":"https://api.github.com/repos/igorbernstein2/gax-java/releases{/id}","deployments_url":"https://api.github.com/repos/igorbernstein2/gax-java/deployments","created_at":"2017-10-31T23:07:12Z","updated_at":"2017-10-31T23:07:15Z","pushed_at":"2018-10-05T19:55:17Z","git_url":"git://github.com/igorbernstein2/gax-java.git","ssh_url":"git@github.com:igorbernstein2/gax-java.git","clone_url":"https://github.com/igorbernstein2/gax-java.git","svn_url":"https://github.com/igorbernstein2/gax-java","homepage":"","size":8477,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"googleapis:master","ref":"master","sha":"25a19db857e6ab0a5b4eddbf998dd7de8f525c53","user":{"login":"googleapis","id":16785467,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Nzg1NDY3","avatar_url":"https://avatars3.githubusercontent.com/u/16785467?v=4","gravatar_id":"","url":"https://api.github.com/users/googleapis","html_url":"https://github.com/googleapis","followers_url":"https://api.github.com/users/googleapis/followers","following_url":"https://api.github.com/users/googleapis/following{/other_user}","gists_url":"https://api.github.com/users/googleapis/gists{/gist_id}","starred_url":"https://api.github.com/users/googleapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleapis/subscriptions","organizations_url":"https://api.github.com/users/googleapis/orgs","repos_url":"https://api.github.com/users/googleapis/repos","events_url":"https://api.github.com/users/googleapis/events{/privacy}","received_events_url":"https://api.github.com/users/googleapis/received_events","type":"Organization","site_admin":false},"repo":{"id":50872805,"node_id":"MDEwOlJlcG9zaXRvcnk1MDg3MjgwNQ==","name":"gax-java","full_name":"googleapis/gax-java","private":false,"owner":{"login":"googleapis","id":16785467,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Nzg1NDY3","avatar_url":"https://avatars3.githubusercontent.com/u/16785467?v=4","gravatar_id":"","url":"https://api.github.com/users/googleapis","html_url":"https://github.com/googleapis","followers_url":"https://api.github.com/users/googleapis/followers","following_url":"https://api.github.com/users/googleapis/following{/other_user}","gists_url":"https://api.github.com/users/googleapis/gists{/gist_id}","starred_url":"https://api.github.com/users/googleapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleapis/subscriptions","organizations_url":"https://api.github.com/users/googleapis/orgs","repos_url":"https://api.github.com/users/googleapis/repos","events_url":"https://api.github.com/users/googleapis/events{/privacy}","received_events_url":"https://api.github.com/users/googleapis/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/googleapis/gax-java","description":"Google API Extensions for Java - shared runtime for clients generated by googleapis/gapic-generator","fork":false,"url":"https://api.github.com/repos/googleapis/gax-java","forks_url":"https://api.github.com/repos/googleapis/gax-java/forks","keys_url":"https://api.github.com/repos/googleapis/gax-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/googleapis/gax-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/googleapis/gax-java/teams","hooks_url":"https://api.github.com/repos/googleapis/gax-java/hooks","issue_events_url":"https://api.github.com/repos/googleapis/gax-java/issues/events{/number}","events_url":"https://api.github.com/repos/googleapis/gax-java/events","assignees_url":"https://api.github.com/repos/googleapis/gax-java/assignees{/user}","branches_url":"https://api.github.com/repos/googleapis/gax-java/branches{/branch}","tags_url":"https://api.github.com/repos/googleapis/gax-java/tags","blobs_url":"https://api.github.com/repos/googleapis/gax-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/googleapis/gax-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/googleapis/gax-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/googleapis/gax-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/googleapis/gax-java/statuses/{sha}","languages_url":"https://api.github.com/repos/googleapis/gax-java/languages","stargazers_url":"https://api.github.com/repos/googleapis/gax-java/stargazers","contributors_url":"https://api.github.com/repos/googleapis/gax-java/contributors","subscribers_url":"https://api.github.com/repos/googleapis/gax-java/subscribers","subscription_url":"https://api.github.com/repos/googleapis/gax-java/subscription","commits_url":"https://api.github.com/repos/googleapis/gax-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/googleapis/gax-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/googleapis/gax-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/googleapis/gax-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/googleapis/gax-java/contents/{+path}","compare_url":"https://api.github.com/repos/googleapis/gax-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/googleapis/gax-java/merges","archive_url":"https://api.github.com/repos/googleapis/gax-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/googleapis/gax-java/downloads","issues_url":"https://api.github.com/repos/googleapis/gax-java/issues{/number}","pulls_url":"https://api.github.com/repos/googleapis/gax-java/pulls{/number}","milestones_url":"https://api.github.com/repos/googleapis/gax-java/milestones{/number}","notifications_url":"https://api.github.com/repos/googleapis/gax-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/googleapis/gax-java/labels{/name}","releases_url":"https://api.github.com/repos/googleapis/gax-java/releases{/id}","deployments_url":"https://api.github.com/repos/googleapis/gax-java/deployments","created_at":"2016-02-01T21:33:22Z","updated_at":"2018-10-05T20:54:52Z","pushed_at":"2018-10-05T23:10:50Z","git_url":"git://github.com/googleapis/gax-java.git","ssh_url":"git@github.com:googleapis/gax-java.git","clone_url":"https://github.com/googleapis/gax-java.git","svn_url":"https://github.com/googleapis/gax-java","homepage":"","size":12318,"stargazers_count":28,"watchers_count":28,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":32,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":32,"open_issues":33,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/googleapis/gax-java/pulls/590"},"html":{"href":"https://github.com/googleapis/gax-java/pull/590"},"issue":{"href":"https://api.github.com/repos/googleapis/gax-java/issues/590"},"comments":{"href":"https://api.github.com/repos/googleapis/gax-java/issues/590/comments"},"review_comments":{"href":"https://api.github.com/repos/googleapis/gax-java/pulls/590/comments"},"review_comment":{"href":"https://api.github.com/repos/googleapis/gax-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/googleapis/gax-java/pulls/590/commits"},"statuses":{"href":"https://api.github.com/repos/googleapis/gax-java/statuses/209a8410295617bbc79515ec1e8673d13109f036"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vam-google"}}