[dynamodb] AWS SDK updated to 2.17.102 (#11914)

* [dynamodb] Update guide for updating the SDK

Some steps were obsolete and required corrections.

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [dynamodb] Update AWS SDK to 2.17.102

- Added NOTICE with all compiled dependencies. Dependencies listed in
  feature.xml are omitted.
- jackson dependency is now provided by AWS SDK as a 'shaded' copy
- log4j version used in tests updated
- Specifying DefaultsMode=STANDARD to make the SDK utilize latest
  recommended parameters. RetryMode is also controlled by DefaultsMode,
  so we avoid setting it explicitly unless overridden by the user.
- Fixed test regressions due to SDK changes

Signed-off-by: Sami Salonen <ssalonen@gmail.com>
This commit is contained in:
Sami Salonen
2022-01-03 15:07:45 +02:00
committed by GitHub
parent dee9ab891f
commit 76855fd81a
9 changed files with 112 additions and 106 deletions

View File

@@ -95,7 +95,7 @@ Modify the policy accordingly if needed.
<!-- markdownlint-disable ol-prefix -->
4. Click _Next: Tags_
5. Click _Next: Review_
6. Enter `openhab-dynamodb-policy` as the _Name_ol-prefix -->
6. Enter `openhab-dynamodb-policy` as the _Name_
7. Click _Create policy_ to finish policy creation
<!-- markdownlint-enable ol-prefix -->
@@ -224,10 +224,10 @@ Similar caveat applies for DynamoDB Time to Live (TTL) setting `expireDays`.
### Updating Amazon SDK
1. Clean `lib/*`
2. Update SDK version in `scripts/fetch_sdk_pom.xml`. You can use the [maven online repository browser](https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-dynamodb) to find the latest version available online.
3. `scripts/fetch_sdk.sh`
4. Copy printed dependencies to `pom.xml`
1. Update SDK version and `netty-nio-client` version in `scripts/fetch_sdk_pom.xml`. You can use the [maven online repository browser](https://mvnrepository.com/artifact/software.amazon.awssdk/dynamodb-enhanced) to find the latest version available online.
2. `scripts/fetch_sdk.sh`
3. Copy printed dependencies to `pom.xml`. If necessary, adjust feature.xml, bnd.importpackage and dep.noembedding as well (probably rarely needed but [it happens](https://aws.amazon.com/blogs/developer/the-aws-sdk-for-java-2-17-removes-its-external-dependency-on-jackson/)).
4. Check & update `NOTICE` file with all the updated, new and removed dependencies.
After these changes, it's good practice to run integration tests (against live AWS DynamoDB) in `org.openhab.persistence.dynamodb.test` bundle.
See README.md in the test bundle for more information how to execute the tests.