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
aws - convert key alias to key id before cache lookup #8505
Conversation
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 for this, looks good 👍 . I added a test and made one tweak (comment inline), feedback or alternatives welcome on that.
Thanks @ajkerrigan , looks good to me. Sorry, I should have added a test 😄 . Also, the test failure here seems unrelated. Great idea of creating a new flipped dict. I guess it might come handy later |
Looks like with this change, we avoid some cases where we'd otherwise need to list all aliases. That secrets manager test had 2 list_aliases calls but only needed to use 1. ...but that might mess with cache reuse. Need to do some more testing with this sorry :-/ |
Thanks for the feedback and changes @ajkerrigan . Let me get back to you on this. I'll test it in our environment to find out if its breaking something. |
Ok, I went ahead and tested this. The original issue doesn't seem to be happening anymore. When running it against a bunch of accounts, I also didn't see any errors. |
That's great, thanks for confirming. I also added a test for that specific cache-related issue. Without the changes in this PR it fails and throws those warnings:
|
Thanks @ajkerrigan, learned something new about testing with cache enabled 😄 |
Closes #8504