Skip to content

Commit 3ecc99a

Browse files
authored
Merge branch 'main' into chore/java21-aspectj1921
2 parents f9dc454 + 76cd363 commit 3ecc99a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Diff for: .github/workflows/run-e2e-tests.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ jobs:
3737
java: [ 8, 11, 17, 21 ]
3838
name: End-to-end tests java${{ matrix.java }}
3939
env:
40-
JAVA_VERSION: ${{ matrix.java }}
4140
AWS_DEFAULT_REGION: eu-west-1
41+
42+
# If matrix.version is 21, use 17, otherwise use matrix.version
43+
# This is because AspectJ does not yet support weaving with Java21; we want
44+
# to test the Java21 runtime, but we can't yet use the JDK21 compiler.
45+
# https://github.com/eclipse-aspectj/aspectj/issues/260#issuecomment-1815920274
46+
JAVA_VERSION: ${{ (matrix.java == 21 && '17') || matrix.java }}
47+
JAVA_LAMBDA_RUNTIME_VERSION: ${{ matrix.java }}
4248
permissions:
4349
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
4450
contents: read
@@ -48,7 +54,8 @@ jobs:
4854
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
4955
with:
5056
distribution: 'corretto'
51-
java-version: ${{ matrix.java }}
57+
# See comment above on JAVA_VERSION env var
58+
java-version: ${{ (matrix.java == 21 && '17') || matrix.java }}
5259
cache: maven
5360
- name: Setup AWS credentials
5461
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0

Diff for: powertools-e2e-tests/src/test/java/software/amazon/lambda/powertools/testutils/Infrastructure.java

-2
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,6 @@ private Builder() {
509509
runtime = mapRuntimeVersion("JAVA_VERSION");
510510
}
511511

512-
513-
514512
private JavaRuntime mapRuntimeVersion(String environmentVariableName) {
515513
String javaVersion = System.getenv(environmentVariableName); // must be set in GitHub actions
516514
JavaRuntime ret = null;

0 commit comments

Comments
 (0)