New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable pre-emptive async oauth token refreshes #646
Merged
igorbernstein2
merged 21 commits into
googleapis:master
from
igorbernstein2:async-refresh
May 20, 2021
Merged
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0e7326c
feat: add pre-emptive async oauth token refreshes
igorbernstein2 76f5c54
minor doc
igorbernstein2 30e3587
update broken test
igorbernstein2 1be67a5
prep for merging with master: The initial async refresh feature was i…
igorbernstein2 c4e8955
merge with origin/master
igorbernstein2 8687928
in blocking mode, when a token is stale, only block the first caller …
igorbernstein2 383f65a
use private monitor to minimize change noise
igorbernstein2 fa101b2
minor tweaks and test
igorbernstein2 706ec19
format
igorbernstein2 bad38dd
fix ExternalAccountCredentials
igorbernstein2 6ce036c
fix boundary checks and add a few more tests
igorbernstein2 617d50c
Merge branch 'master' into async-refresh
igorbernstein2 909b9e4
add another test for making sure that blocking stacktraces include th…
igorbernstein2 b7b585b
address feedback
igorbernstein2 14f21e3
optimize for the common case
igorbernstein2 f337392
Merge branch 'master' into async-refresh
igorbernstein2 a1c53f0
Merge branch 'master' into async-refresh
igorbernstein2 a17186e
codestyle
igorbernstein2 a69c2b0
use Date to calculate cache state to fix tests that mock access token
igorbernstein2 b3d5605
remove accidental double call
igorbernstein2 a5a5a47
Merge branch 'master' into async-refresh
lesv File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to reviewer: before this PR, the blocking version getRequestMetadata() was the primary codepath, so ExternalAccountCredentials only had to override that method. This subclass expected that the async version would just call the sync version. Which I think is a poor assumption since its an implementation detail. I corrected the behavior by overriding both.
Arguably a better approach is to make both getRequestMetadata final and have subclasses use asyncFetch() as the source of truth, but I didn't want to leak guava to the surface of this library