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.
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
Add RFC: Providing fallback credentials on timeout #2218
Add RFC: Providing fallback credentials on timeout #2218
Changes from 1 commit
06ea250
77c2b4f
8904a5e
d5657d3
e4c571c
9323dad
3834c0e
9be64b2
e5db721
7f55765
c79eee5
e79eca1
69477ae
d413e58
5bb7f01
7b62d47
7311f87
7aca08b
9608f25
16a14ba
6cc0a72
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is there any reason this shouldn't be synchronous? What's the use-case for asynchronously retrieving the credentials on timeout? Would we have a timeout for the
on_timeout
?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.
No reason it shouldn't. I think each has pros/cons:
pros: Easier to reason about.
cons: Will be a breaking change if we want to switch to async in the future.
pros: It's async from the beginning, so less likely to introduce a breaking change.
cons: Exactly what you brought up, may need to specify a timeout.
Currently, there are no concrete use cases requiring this to be async.
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.
It is possible, although I don't think we specify that as an input argument to
fallback_on_interrupt
for the same reason I described in the Alternative section in the RFC. Whoever usesfallback_on_timeout
can race it against a timeout future just likeLazyCredentialsCache
does withprovide_credentials
today. It just that the timeout forfallback_on_timeout
will probably be way shorter than that forprovide_credentials
, as the execution offallback_on_timeout
shouldn't take too long.Haven't decided whether the timeout for
fallback_on_timeout
should be introduced today (something likeload_timeout
forLazyCredentialsCache
). If we are to introduce it later, we need to see if we can do so without causing breaking changes.