oharaandrew314 / dynamodb-kotlin-module

Kotlin Module for the dynamodb-enhanced SDk
Apache License 2.0
26 stars 3 forks source link

CreateTableTest fails with newer dynamodb-enhanced:2.20.+ version #8

Closed padenn2 closed 1 year ago

padenn2 commented 1 year ago

The "original createTable will lose indices" unit test will fail if dynamodb-enhanced is upgraded to a newer 2.20.+ version.

> Task :test

CreateTableTest > original createTable will lose indices() FAILED
    java.lang.AssertionError at CreateTableTest.kt:31

57 tests completed, 1 failed
padenn2 commented 1 year ago

It appears https://github.com/aws/aws-sdk-java-v2/releases/tag/2.20.86 is the exact upstream version that causes the test to break. With 2.20.85 the test passes.

cjkent commented 1 year ago

Presumably this commit is the issue? It fixes the bug that DynamoDbTable.createTableWithIndices() works around.

oharaandrew314 commented 1 year ago

Wow, it looks like the SDK maintainers changed their mind about creating the indices by default. I'll look into a compatibility fix and document that createTableWithIndices is only necessary prior to 2.20.86

oharaandrew314 commented 1 year ago

I've upgraded the minimum SDK version to 2.20.86, updated the tests, and deprecated createTableWithIndices. Upgrading to the new 0.2.3 release shouldn't be necessary (since this issue only affects building), but it's available as an option regardless.

padenn2 commented 1 year ago

Thx for the quick fix @oharaandrew314 !