Updates the DynamoDB persistence adapter to use the v2 AWS SDK for Java.
Motivation and Context
This change was originally made in response to issue #262 reporting issues with multiple versions of Jackson being on the classpath. The existing v1 AWS SDK depends on Jackson 2.6, which is extremely outdated, while the ASK SDK is now depending on 2.10.x. There are inherent incompatibilities between these versions that prevent the 2.10.x versions from being used by the AWS SDK via a dependency override. This upgrades our dependency to the v2 AWS SDK for Java which depends on Jackson 2.10.x.
This change should have no functional impact on skill utilizing the persistence feature. It does however have two avenues for backwards incompatibility:
The DynamoDB persistence adapter allows a developer to pass a custom DynamoDbClient instance in. Any usage of this will need to be updated to pass in a v2 DynamoDB client instance. Existing usage will fail at compile time due to the different v2 type now expected.
Anyone transitively depending on the v1 DynamoDB client through a dependency on the ASK SDK will no longer get that dependency following this change. This dependency would need to be declared directly in the customer's codebase/pom.xml to continue using it. In general transitive dependencies are not recommended.
I believe both of these cases to be fairly low occurrence and would surface at build time rather than runtime. An alternative would be to depend on both versions of the AWS SDK to continue supporting the above cases but this continues to put the outdated version of Jackson on developers classpaths. Given the tradeoffs I believe it is better to make a clean shift to the v2 AWS SDK and align on the modern Jackson library version.
Testing
New unit tests covering the additional transformation logic ported over from the v1 DynamoDB SDK ItemUtils class and updated persistence adapter tests. Skill testing.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[x] My code follows the code style of this project
[ ] My change requires a change to the documentation
[ ] I have updated the documentation accordingly
[x] I have read the README document
[x] I have added tests to cover my changes
[x] All new and existing tests passed
License
[x] I confirm that this pull request can be released under the Apache 2 license
Description
Updates the DynamoDB persistence adapter to use the v2 AWS SDK for Java.
Motivation and Context
This change was originally made in response to issue #262 reporting issues with multiple versions of Jackson being on the classpath. The existing v1 AWS SDK depends on Jackson 2.6, which is extremely outdated, while the ASK SDK is now depending on 2.10.x. There are inherent incompatibilities between these versions that prevent the 2.10.x versions from being used by the AWS SDK via a dependency override. This upgrades our dependency to the v2 AWS SDK for Java which depends on Jackson 2.10.x.
This change should have no functional impact on skill utilizing the persistence feature. It does however have two avenues for backwards incompatibility:
The DynamoDB persistence adapter allows a developer to pass a custom DynamoDbClient instance in. Any usage of this will need to be updated to pass in a v2 DynamoDB client instance. Existing usage will fail at compile time due to the different v2 type now expected.
Anyone transitively depending on the v1 DynamoDB client through a dependency on the ASK SDK will no longer get that dependency following this change. This dependency would need to be declared directly in the customer's codebase/pom.xml to continue using it. In general transitive dependencies are not recommended.
I believe both of these cases to be fairly low occurrence and would surface at build time rather than runtime. An alternative would be to depend on both versions of the AWS SDK to continue supporting the above cases but this continues to put the outdated version of Jackson on developers classpaths. Given the tradeoffs I believe it is better to make a clean shift to the v2 AWS SDK and align on the modern Jackson library version.
Testing
New unit tests covering the additional transformation logic ported over from the v1 DynamoDB SDK ItemUtils class and updated persistence adapter tests. Skill testing.
Types of changes
Checklist
License