Skip to content

Commit 3239dda

Browse files
darklight3itDavide Melfi
andauthored
Re-apply Jackson 2.18.6 upgrade with round-trip test coverage (#599)
* test: 🧪 add roundtrip serialization test utility * test: fix false positives epoch format errors, added comment about this in the serialization package. * test: fixed false positves DateTime differences * test: fixing error in lex event fixture * test: fixing connect event * test: fixing api gateway proxy event false negative * test: fixing cloudfront and s3 event false negatives * chore: adding mise to gitignore * test: fix MSKFirehose, LexEvent, RabbitMQ, APIGatewayV2Auth and ActiveMQ serialization test fixtures * test: Add round-trip fixtures for 4 registered events Add JSON test fixtures and round-trip test cases for CognitoEvent, DynamodbTimeWindowEvent, IoTButtonEvent, and KinesisTimeWindowEvent. These were the only events registered in LambdaEventSerializers SUPPORTED_EVENTS that lacked test fixtures. Fixtures based on official AWS Lambda documentation examples. Time window event fixtures use round-trip-safe date formats to avoid coercion issues. Coverage: 32 passing + 2 known failures (34 total, up from 30). * test: Add round-trip fixtures for 21 unregistered events Add UnregisteredEventSerializationRoundTripTest covering events not in LambdaEventSerializers.SUPPORTED_EVENTS: 10 Cognito UserPool triggers, 5 Kinesis Analytics events, 2 API Gateway V2 WebSocket, 2 AppSync, 1 S3 Batch, and 1 TimeWindow response. S3ObjectLambdaEvent is a known failure (Lombok xAmzRequestId naming issue). Split SerializationRoundTripTest into registered (34 tests) and unregistered (22 tests) for clarity. Total: 56 tests, 53 passing, 3 known failures. * test: Add round-trip tests for 11 response event types Add ResponseEventSerializationRoundTripTest covering all 11 response event types in aws-lambda-java-events. 9 pass cleanly, 2 are known failures (IamPolicyResponse, IamPolicyResponseV1 — getPolicyDocument() returns Map<String,Object> instead of the PolicyDocument POJO, making round-trip impossible by design since these are serialize-only types). Also update SerializationRoundTripTest comment for APIGatewayV2CustomAuthorizerEvent to clarify the date format change is a lossy transformation, not a bug. Total: 69 tests (34 registered + 22 unregistered + 11 response + 2 LambdaEventAssertTest), all green. Coverage now 66/68 event classes (97%). * chore: fixed comment * test: including IAM Policy Reponse roundtrip test * test: add test for JsonNodeUtils * chore: remove unwanted file on origin * docs: add tests 1.1.2 changelog entry * chore: remove entry in changelog * fix: 🔧 updating again jacjson 2.15.4 -> 2.18.6 * fix: fixing an error in github actions that was causing false positive errors when running aws-lambda-java-serialization * docs: update changelogs * chore: releasing aws-lambda-tests * chore: add space --------- Co-authored-by: Davide Melfi <dmelfi@amazon.com>
1 parent 3d9661e commit 3239dda

File tree

7 files changed

+164
-161
lines changed

7 files changed

+164
-161
lines changed

.github/workflows/aws-lambda-java-serialization.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
# Package and install target module
4242
- name: Package serialization with Maven
43-
run: mvn -B package install --file aws-lambda-java-serialization/pom.xml
43+
run: mvn -B install --file aws-lambda-java-serialization/pom.xml
4444

4545
# Run tests
4646
- name: Run tests from aws-lambda-java-tests

aws-lambda-java-serialization/RELEASE.CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
### March 26, 2026
2+
`1.4.0`:
3+
- Update `jackson-databind` dependency from 2.15.4 to 2.18.6
4+
- Replace deprecated `PropertyNamingStrategy.PascalCaseStrategy` with `PropertyNamingStrategies.UpperCamelCaseStrategy`
5+
- The regression reported in 1.3.1 was a false positive caused by a CI workflow bug (`mvn package install` running the shade plugin twice, corrupting the artifact). Fixed by using `mvn install` instead.
6+
17
### March 19, 2026
28
`1.3.1`:
39
- Revert `jackson-databind` dependency from 2.18.6 to 2.15.4
410
- Revert `PropertyNamingStrategies.UpperCamelCaseStrategy` to `PropertyNamingStrategy.PascalCaseStrategy`
11+
- Note: reverted due to a suspected regression in Joda DateTime deserialization; later confirmed to be a false positive (see 1.4.0)
512

613
### March 11, 2026
714
`1.3.0`:

aws-lambda-java-serialization/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.amazonaws</groupId>
66
<artifactId>aws-lambda-java-serialization</artifactId>
7-
<version>1.3.1</version>
7+
<version>1.4.0</version>
88
<packaging>jar</packaging>
99

1010
<name>AWS Lambda Java Runtime Serialization</name>
@@ -32,7 +32,7 @@
3232
<maven.compiler.source>1.8</maven.compiler.source>
3333
<maven.compiler.target>1.8</maven.compiler.target>
3434
<relocation.prefix>com.amazonaws.lambda.thirdparty</relocation.prefix>
35-
<jackson.version>2.15.4</jackson.version>
35+
<jackson.version>2.18.6</jackson.version>
3636
<gson.version>2.10.1</gson.version>
3737
<json.version>20231013</json.version>
3838
<owasp.version>7.3.2</owasp.version>

aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/LambdaEventSerializers.java

Lines changed: 138 additions & 147 deletions
Large diffs are not rendered by default.

aws-lambda-java-tests/RELEASE.CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### March 27, 2026
2+
`1.1.3`:
3+
- Add serialization round-trip tests covering 66 event classes
4+
- Bumped `aws-lambda-java-serialization` to version `1.4.0` (Jackson `2.15.x``2.18.6`)
5+
- Bumped `aws-lambda-java-events` to version `3.16.1`
6+
17
### August 26, 2021
28
`1.1.1`:
39
- Bumped `aws-lambda-java-events` to version `3.11.0`

aws-lambda-java-tests/pom.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.amazonaws</groupId>
77
<artifactId>aws-lambda-java-tests</artifactId>
8-
<version>1.1.2</version>
8+
<version>1.1.3</version>
99
<packaging>jar</packaging>
1010

1111
<name>AWS Lambda Java Tests</name>
@@ -40,18 +40,22 @@
4040
-->
4141
<junit.version>5.9.2</junit.version>
4242
<jacoco.maven.plugin.version>0.8.7</jacoco.maven.plugin.version>
43+
<aws-lambda-java-serialization.version>1.4.0</aws-lambda-java-serialization.version>
44+
<aws-lambda-java-events.version>3.16.1</aws-lambda-java-events.version>
45+
<commons-lang3.version>3.18.0</commons-lang3.version>
46+
<assertj-core.version>3.27.7</assertj-core.version>
4347
</properties>
4448

4549
<dependencies>
4650
<dependency>
4751
<groupId>com.amazonaws</groupId>
4852
<artifactId>aws-lambda-java-serialization</artifactId>
49-
<version>1.2.0</version>
53+
<version>${aws-lambda-java-serialization.version}</version>
5054
</dependency>
5155
<dependency>
5256
<groupId>com.amazonaws</groupId>
5357
<artifactId>aws-lambda-java-events</artifactId>
54-
<version>3.16.1</version>
58+
<version>${aws-lambda-java-events.version}</version>
5559
</dependency>
5660
<dependency>
5761
<groupId>org.junit.jupiter</groupId>
@@ -71,13 +75,13 @@
7175
<dependency>
7276
<groupId>org.apache.commons</groupId>
7377
<artifactId>commons-lang3</artifactId>
74-
<version>3.18.0</version>
78+
<version>${commons-lang3.version}</version>
7579
</dependency>
7680

7781
<dependency>
7882
<groupId>org.assertj</groupId>
7983
<artifactId>assertj-core</artifactId>
80-
<version>3.27.7</version>
84+
<version>${assertj-core.version}</version>
8185
<scope>test</scope>
8286
</dependency>
8387
</dependencies>

aws-lambda-java-tests/src/main/java/com/amazonaws/services/lambda/runtime/tests/LambdaEventAssert.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,8 @@
2525
* {@link AssertionError}.
2626
* </p>
2727
*
28-
* <p>
29-
* This class is intentionally package-private to support updates to
30-
* the aws-lambda-java-events and aws-lambda-java-serialization packages.
31-
* Consider making it public if there's a real request for it.
32-
* </p>
3328
*/
34-
class LambdaEventAssert {
29+
public class LambdaEventAssert {
3530

3631
private static final ObjectMapper MAPPER = new ObjectMapper();
3732

0 commit comments

Comments
 (0)