Repository navigation
Fix flaky AWSPREVIOUS read in Secrets Manager integration test - #155
Merged
Merged
Conversation
kuhe
approved these changes
Nov 24, 2026
rohangavankar
approved these changes
Nov 24, 2026
jonathan343
reviewed
Nov 24, 2026
| GetSecretValueInput(secret_id=secret_name, version_stage="AWSPREVIOUS") | ||
| ), | ||
| done=lambda r: r.version_id == original.version_id, | ||
| retry_on=(ResourceNotFoundException,), |
Contributor
There was a problem hiding this comment.
There are other similar calls. Is this one particularly susceptible to this failure?
Contributor
Author
There was a problem hiding this comment.
It’s the only read that asks for something the write creates and doesn’t already retry ResourceNotFoundException. The other reads after the put ask for things that already existed (AWSCURRENT, the version list), so a lagging read returns old data that done retries instead of raising.
jonathan343
approved these changes
Nov 24, 2026
Contributor
Author
|
The PR build succeeded but the build request was throttled for 36 min due to our concurrency limit. The GitHub job timed out at 19:16, before the build finished. Merging. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
In
test_new_version_rotates_current_and_previous_stages, the AWSPREVIOUS label isn't always readable right afterPutSecretValue. If the test reads it too early,GetSecretValueraisesResourceNotFoundException. Thewait_untilaround that read didn't retry this exception, so the test failed instead of waiting.Fix
Pass
retry_on=(ResourceNotFoundException,)to thewait_untilcall. The other reads in this file already do this. Any other error still fails the test immediately.Testing
Ran the test locally in async and sync modes. Both passed.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.