Repository navigation
fix(parameters): invalidate cache after set_parameter and set_secret - #8622
leandrodamascena merged 4 commits into
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
Resolve the test helper conflict and keep cache invalidation correct for cache keys that include sdk_options.
|
I completed an additional review of the cache invalidation changes and confirmed coverage for cache keys with and without |
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks @Suraj1347, this one is solid. I ran it against real Parameter Store and Secrets Manager with reads and writes inside the cache window: single values, decrypt=True entries, the batch path and the module-level functions all return what was just written, a failed put_parameter leaves the cache alone, and the create path for a new secret works too. Leaving grouped get_multiple entries untouched and saying so in the docstring is the right call.
Approving. This goes out in 3.39.0, so it will sit here for a while before I merge it. No rebase needed in the meantime, and you'll be credited in the release notes.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8622 +/- ##
========================================
Coverage 96.97% 96.97%
========================================
Files 321 321
Lines 16266 16277 +11
Branches 1456 1459 +3
========================================
+ Hits 15774 15785 +11
Misses 352 352
Partials 140 140 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
8089f8a
into
aws-powertools:develop



Issue
Closes #8599
Summary
After a successful parameter or secret write, the provider's in-memory cache could continue returning the previous value until the cache expired.
Changes
BaseProvider.Grouped and nested cache entries are intentionally not invalidated by this change; the implementation documents this limitation.
Verification
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.