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.
I'm running into a limitation of
tempest2
- static table names. This is a limitation thattempest
doesn't have, because it allows callers to pass in aDynamoDbMapperConfig
that includes either an override or a table name resolver (relevant javadoc)The AWS v2 client library doesn't support a way of resolving/overriding table names. I think this is because the enhanced client allows you to pass in the table name as a string, removing the need for the v2 client to care about how the name gets resolved. Unfortunately
tempest2
uses AWS v1-esque annotations for table names, which prevents callers from leveraging this flexibility.I figured I'd take a page out of amazon's book and add a
TableNameResolver
. It seemed like the most flexible way to allow dynamic table names without breaking backwards compatibility.Why?
We run multiple gradle workers on the same node in order to run tests in parallel. To avoid conflicts across test runs, we prefix dynamo tables and other resources with the test worker number. That's impossible with tempest for obvious reasons, and has led to a high degree of flaky tests on our tempest-based dynamo tables.
Adding a name resolver will let us prefix table names appropriately and avoid flakiness