-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix MostRecentProvider.encryption_materials() caching bug #102
Conversation
Working on understanding the fix here. It seems that the original logic was this: check if ttl_action is TtlActions.LIVE, and if so return the given provider from the cache. Also, in this case return a provider instead of encryption materials like in the other cases. If it failed, set the ttl_action to EXPIRED and pull the provider from the local cache if thats allowed. If it's not allowed, miss the cache. Is it the case that this fixes the return types of the method to be consistent? And then, was there a problem with the cache returning None for its values? |
Yes. What used to happen was that the return type from This test[1] failing was what identified this issue. |
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.
Thanks! Good find
Description of changes:
A customer encountered a bug where
MostRecentProvider
was not actually using cached results. Upon investigation, this uncovered this bug where the provider was returning invalid results once the cache was populated.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.