Skip to content

Commit a691a3b

Browse files
authored
chore(ci): Make E2E tests compatible with latest CDK lib version. Improve retry implementation. (#2008)
* chore(ci): Make E2E asset deployment compatible with updated CDK lib version. Refactor retry4j to resilience4j. * Add Retry logic to tests instead of Thread.sleep where appropriate. * Avoid request building code duplication in BatchE2ET.java. * Include TracingE2ET again after updating retry logic. * Address Sonarlint issues. * Downgrade resilience4j to Java11 compatible version 1.x * Fix pmd_analyze issues. * Fix more pmd_analyze issues. * Fix more pmd_analyze issues. * Fix more pmd_analyze issues. * Fix more pmd_analyze issues. * Fix more pmd_analyze issues. * Add GraalVM support for TracingE2ET. * Increase TracingE2ET timeout to 15 minutes.
1 parent e6c1676 commit a691a3b

File tree

26 files changed

+724
-342
lines changed

26 files changed

+724
-342
lines changed

powertools-e2e-tests/handlers/idempotency/src/main/java/software/amazon/lambda/powertools/e2e/Function.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ public String handleRequest(Input input, Context context) {
6060
DateTimeFormatter dtf = DateTimeFormatter.ISO_DATE_TIME.withZone(TimeZone.getTimeZone("UTC").toZoneId());
6161
return dtf.format(Instant.now());
6262
}
63-
}
63+
}

powertools-e2e-tests/handlers/tracing/pom.xml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44

55
<parent>
@@ -21,6 +21,14 @@
2121
<groupId>com.amazonaws</groupId>
2222
<artifactId>aws-lambda-java-events</artifactId>
2323
</dependency>
24+
<dependency>
25+
<groupId>com.amazonaws</groupId>
26+
<artifactId>aws-lambda-java-runtime-interface-client</artifactId>
27+
</dependency>
28+
<dependency>
29+
<groupId>com.amazonaws</groupId>
30+
<artifactId>aws-lambda-java-core</artifactId>
31+
</dependency>
2432
<dependency>
2533
<groupId>org.aspectj</groupId>
2634
<artifactId>aspectjrt</artifactId>
@@ -57,4 +65,18 @@
5765
</plugin>
5866
</plugins>
5967
</build>
68+
69+
<profiles>
70+
<profile>
71+
<id>native-image</id>
72+
<build>
73+
<plugins>
74+
<plugin>
75+
<groupId>org.graalvm.buildtools</groupId>
76+
<artifactId>native-maven-plugin</artifactId>
77+
</plugin>
78+
</plugins>
79+
</build>
80+
</profile>
81+
</profiles>
6082
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[
2+
{
3+
"name":"com.amazonaws.services.lambda.runtime.LambdaRuntime",
4+
"methods":[{"name":"<init>","parameterTypes":[] }],
5+
"fields":[{"name":"logger"}],
6+
"allPublicMethods":true
7+
},
8+
{
9+
"name":"com.amazonaws.services.lambda.runtime.LambdaRuntimeInternal",
10+
"methods":[{"name":"<init>","parameterTypes":[] }],
11+
"allPublicMethods":true
12+
}
13+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[
2+
{
3+
"name": "com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent",
4+
"allDeclaredFields": true,
5+
"allDeclaredMethods": true,
6+
"allDeclaredConstructors": true
7+
},
8+
{
9+
"name": "com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent$ProxyRequestContext",
10+
"allDeclaredFields": true,
11+
"allDeclaredMethods": true,
12+
"allDeclaredConstructors": true
13+
},
14+
{
15+
"name": "com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent$RequestIdentity",
16+
"allDeclaredFields": true,
17+
"allDeclaredMethods": true,
18+
"allDeclaredConstructors": true
19+
},
20+
{
21+
"name": "com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent",
22+
"allDeclaredFields": true,
23+
"allDeclaredMethods": true,
24+
"allDeclaredConstructors": true
25+
},
26+
{
27+
"name": "com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent",
28+
"allDeclaredConstructors": true,
29+
"allPublicConstructors": true,
30+
"allDeclaredMethods": true,
31+
"allPublicMethods": true,
32+
"allDeclaredClasses": true,
33+
"allPublicClasses": true
34+
}
35+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[
2+
{
3+
"name":"com.amazonaws.services.lambda.runtime.api.client.runtimeapi.LambdaRuntimeClientException",
4+
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","int"] }]
5+
},
6+
{
7+
"name":"com.amazonaws.services.lambda.runtime.api.client.runtimeapi.dto.InvocationRequest",
8+
"fields":[{"name":"id"}, {"name":"invokedFunctionArn"}, {"name":"deadlineTimeInMs"}, {"name":"xrayTraceId"}, {"name":"clientContext"}, {"name":"cognitoIdentity"}, {"name": "tenantId"}, {"name":"content"}],
9+
"allPublicMethods":true
10+
}
11+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Args = --initialize-at-build-time=jdk.xml.internal.SecuritySupport
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
[
2+
{
3+
"name": "com.amazonaws.lambda.thirdparty.com.fasterxml.jackson.databind.deser.Deserializers[]"
4+
},
5+
{
6+
"name": "com.amazonaws.lambda.thirdparty.com.fasterxml.jackson.databind.ext.Java7SupportImpl",
7+
"methods": [{ "name": "<init>", "parameterTypes": [] }]
8+
},
9+
{
10+
"name": "com.amazonaws.services.lambda.runtime.LambdaRuntime",
11+
"fields": [{ "name": "logger" }]
12+
},
13+
{
14+
"name": "com.amazonaws.services.lambda.runtime.logging.LogLevel",
15+
"allDeclaredConstructors": true,
16+
"allPublicConstructors": true,
17+
"allDeclaredMethods": true,
18+
"allPublicMethods": true,
19+
"allDeclaredFields": true,
20+
"allPublicFields": true
21+
},
22+
{
23+
"name": "com.amazonaws.services.lambda.runtime.logging.LogFormat",
24+
"allDeclaredConstructors": true,
25+
"allPublicConstructors": true,
26+
"allDeclaredMethods": true,
27+
"allPublicMethods": true,
28+
"allDeclaredFields": true,
29+
"allPublicFields": true
30+
},
31+
{
32+
"name": "java.lang.Void",
33+
"methods": [{ "name": "<init>", "parameterTypes": [] }]
34+
},
35+
{
36+
"name": "java.util.Collections$UnmodifiableMap",
37+
"fields": [{ "name": "m" }]
38+
},
39+
{
40+
"name": "jdk.internal.module.IllegalAccessLogger",
41+
"fields": [{ "name": "logger" }]
42+
},
43+
{
44+
"name": "sun.misc.Unsafe",
45+
"fields": [{ "name": "theUnsafe" }]
46+
},
47+
{
48+
"name": "com.amazonaws.services.lambda.runtime.api.client.runtimeapi.dto.InvocationRequest",
49+
"fields": [
50+
{ "name": "id" },
51+
{ "name": "invokedFunctionArn" },
52+
{ "name": "deadlineTimeInMs" },
53+
{ "name": "xrayTraceId" },
54+
{ "name": "clientContext" },
55+
{ "name": "cognitoIdentity" },
56+
{ "name": "tenantId" },
57+
{ "name": "content" }
58+
],
59+
"allPublicMethods": true
60+
}
61+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"resources": {
3+
"includes": [
4+
{
5+
"pattern": "\\Qjni/libaws-lambda-jni.linux-aarch_64.so\\E"
6+
},
7+
{
8+
"pattern": "\\Qjni/libaws-lambda-jni.linux-x86_64.so\\E"
9+
},
10+
{
11+
"pattern": "\\Qjni/libaws-lambda-jni.linux_musl-aarch_64.so\\E"
12+
},
13+
{
14+
"pattern": "\\Qjni/libaws-lambda-jni.linux_musl-x86_64.so\\E"
15+
}
16+
]
17+
},
18+
"bundles": []
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[
2+
{
3+
"name": "com.amazonaws.lambda.thirdparty.com.fasterxml.jackson.databind.deser.Deserializers[]"
4+
},
5+
{
6+
"name": "com.amazonaws.lambda.thirdparty.com.fasterxml.jackson.databind.ext.Java7HandlersImpl",
7+
"methods": [{ "name": "<init>", "parameterTypes": [] }]
8+
},
9+
{
10+
"name": "com.amazonaws.lambda.thirdparty.com.fasterxml.jackson.databind.ext.Java7SupportImpl",
11+
"methods": [{ "name": "<init>", "parameterTypes": [] }]
12+
},
13+
{
14+
"name": "com.amazonaws.lambda.thirdparty.com.fasterxml.jackson.databind.ser.Serializers[]"
15+
},
16+
{
17+
"name": "org.joda.time.DateTime",
18+
"allDeclaredConstructors": true,
19+
"allPublicConstructors": true,
20+
"allDeclaredMethods": true,
21+
"allPublicMethods": true,
22+
"allDeclaredClasses": true,
23+
"allPublicClasses": true
24+
}
25+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[
2+
{
3+
"name": "software.amazon.lambda.powertools.e2e.Function",
4+
"allDeclaredConstructors": true,
5+
"allPublicConstructors": true,
6+
"allDeclaredMethods": true,
7+
"allPublicMethods": true,
8+
"allDeclaredClasses": true,
9+
"allPublicClasses": true
10+
},
11+
{
12+
"name": "software.amazon.lambda.powertools.e2e.Input",
13+
"allDeclaredConstructors": true,
14+
"allPublicConstructors": true,
15+
"allDeclaredMethods": true,
16+
"allPublicMethods": true,
17+
"allDeclaredClasses": true,
18+
"allPublicClasses": true
19+
}
20+
]

0 commit comments

Comments
 (0)