Skip to content

Conversation

@phipag
Copy link
Contributor

@phipag phipag commented Aug 25, 2025

Summary

This PR introduces GraalVM support for the idempotency module including native unit and e2e tests.

Other improvements:

  • Use aws-powertools_ubuntu-latest_8-core for GraalVM build which cuts build time in half
  • Fix a lot of sonar findings in unit tests
  • Remove Mac M1 dependency for DynamoDB local. This is treated as an external JVM process now also making it compatible with GraalVM native tests.
  • Add GraalVM example with better README.md file (let me know what you think and I'll apply the same README style to the other GraalVM examples)
  • Update overall example README (it was outdated and had broken links)
  • Add --platform linux/amd64 to CDK Bundling options to fix builds on podman 5.6.0 (https://blog.podman.io/2025/08/podman-5-6-released-rosetta-status-update/)
    • at the cost of build time performance unfortunately ...

Changes

Issue number: #1834


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2025

Dependency Review

The following issues were found:

  • ✅ 0 vulnerable package(s)
  • ❌ 2 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 10 package(s) with unknown licenses.
  • ⚠️ 2 packages with OpenSSF Scorecard issues.

View full job summary

@phipag
Copy link
Contributor Author

phipag commented Aug 26, 2025

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > putRecord_shouldThrowIdempotencyItemAlreadyExistsException_IfRecordAlreadyExist() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > idempotencyDisabled_noClientShouldBeCreated() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > getRecord_shouldReturnExistingRecord() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > putRecord_shouldCreateRecordInDynamoDB() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > putRecord_shouldCreateRecordInDynamoDB_IfLambdaWasInProgressAndTimedOut() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > deleteRecord_shouldDeleteRecord() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > getRecord_shouldThrowException_whenRecordIsAbsent() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > endToEndWithCustomAttrNamesAndSortKey() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > putRecord_shouldBlockUpdate_IfRecordAlreadyExistAndProgressNotExpiredAfterLambdaTimedOut() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > putRecord_shouldCreateRecordInDynamoDB_IfPreviousExpired() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStoreTest > updateRecord_shouldUpdateRecord() SUCCESSFUL

software.amazon.lambda.powertools.idempotency.persistence.dynamodb.IdempotencyTest > endToEndTest() SUCCESSFUL


Test run finished after 204 ms
[         3 containers found      ]
[         0 containers skipped    ]
[         3 containers started    ]
[         0 containers aborted    ]
[         3 containers successful ]
[         0 containers failed     ]
[        12 tests found           ]
[         0 tests skipped         ]
[        12 tests started         ]
[         0 tests aborted         ]
[        12 tests successful      ]
[         0 tests failed          ]

@phipag
Copy link
Contributor Author

phipag commented Aug 26, 2025

E2E tests pass now.

@sonarqubecloud
Copy link

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see one of the CI checks is failing, is it related to changes in this PR?

@phipag
Copy link
Contributor Author

phipag commented Aug 27, 2025

I see one of the CI checks is failing, is it related to changes in this PR?

No, it is not related to this. Only due to the changes in this PR it is triggered again. the EPL-2.0 license used in all AspectJ dependencies has no general approval which is why we did not add it to the generally approved licenses list. For this PR, no new package is introduced with an unapproved license.

@dreamorosi dreamorosi self-requested a review August 27, 2025 13:13
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future GraalVM PRs I'd exclude examples since I don't know that having an example for each combination of setup x utility is useful.

@phipag phipag merged commit 7594e5a into main Aug 27, 2025
20 of 21 checks passed
@github-project-automation github-project-automation bot moved this from Pending review to Coming soon in Powertools for AWS Lambda (Java) Aug 27, 2025
@phipag phipag deleted the phipag/idempotency-graalvm branch August 27, 2025 13:21
@phipag phipag linked an issue Aug 27, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Coming soon

Development

Successfully merging this pull request may close these issues.

feat(graalvm): GraalVM support for Idempotency utility

2 participants