From ab8c8b87d354b3b20e5083c1bac5f3e973053aa9 Mon Sep 17 00:00:00 2001 From: hdavidh Date: Wed, 7 May 2025 19:56:16 -0700 Subject: [PATCH 1/4] Separate migration tests from regular builds --- .../removal-AWSSDKforJavav2-c58118f.json | 6 ++++++ .github/workflows/codebuild-ci.yml | 14 ++++++++++++++ buildspecs/migration-test.yml | 17 +++++++++++++++++ buildspecs/resources/ci.cloudformation.yml | 2 ++ pom.xml | 16 ++++++++++++++++ test/v2-migration-tests/pom.xml | 11 +++++++++++ 6 files changed, 66 insertions(+) create mode 100644 .changes/next-release/removal-AWSSDKforJavav2-c58118f.json create mode 100644 buildspecs/migration-test.yml diff --git a/.changes/next-release/removal-AWSSDKforJavav2-c58118f.json b/.changes/next-release/removal-AWSSDKforJavav2-c58118f.json new file mode 100644 index 000000000000..a1e3dd2970ab --- /dev/null +++ b/.changes/next-release/removal-AWSSDKforJavav2-c58118f.json @@ -0,0 +1,6 @@ +{ + "type": "removal", + "category": "AWS SDK for Java v2", + "contributor": "", + "description": "Separate migration tests from normal builds" +} diff --git a/.github/workflows/codebuild-ci.yml b/.github/workflows/codebuild-ci.yml index c99c8eae844f..749c2762b885 100644 --- a/.github/workflows/codebuild-ci.yml +++ b/.github/workflows/codebuild-ci.yml @@ -139,3 +139,17 @@ jobs: uses: aws-actions/aws-codebuild-run-build@v1 with: project-name: aws-sdk-java-v2-endpoints-test + migration-tests: + if: github.repository == 'aws/aws-sdk-java-v2' + runs-on: ubuntu-latest + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} + aws-region: us-west-2 + role-duration-seconds: 7200 + - name: Run migration test + uses: aws-actions/aws-codebuild-run-build@v1 + with: + project-name: aws-sdk-java-v2-migration-test diff --git a/buildspecs/migration-test.yml b/buildspecs/migration-test.yml new file mode 100644 index 000000000000..2728a23e09a6 --- /dev/null +++ b/buildspecs/migration-test.yml @@ -0,0 +1,17 @@ +version: 0.2 + +phases: + install: + runtime-versions: + java: "$JAVA_RUNTIME" + + build: + commands: + - mvn clean install -pl :v2-migration-tests -P migration-tests -T1C $MAVEN_OPTIONS + finally: + - mkdir -p codebuild-test-reports + - find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \; +reports: + IntegTests: + files: + - 'codebuild-test-reports/**/*' diff --git a/buildspecs/resources/ci.cloudformation.yml b/buildspecs/resources/ci.cloudformation.yml index 02adcf3a24c4..b1d978768b83 100644 --- a/buildspecs/resources/ci.cloudformation.yml +++ b/buildspecs/resources/ci.cloudformation.yml @@ -57,6 +57,7 @@ Resources: - !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-native-image-test - !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-sonar - !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-endpoints-test + - !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-migration-test - Effect: Allow Action: - logs:GetLogEvents @@ -69,6 +70,7 @@ Resources: - !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-native-image-test:* - !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-sonar:* - !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-endpoints-test:* + - !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-migration-test:* GithubOidc: Type: AWS::IAM::OIDCProvider diff --git a/pom.xml b/pom.xml index e33e7b823edd..87fb26060722 100644 --- a/pom.xml +++ b/pom.xml @@ -191,6 +191,7 @@ 2.1.0 ${skipTests} + true ${project.basedir}/src/it/java ${session.executionRootDirectory} https://github.com/aws/aws-sdk-java-v2 @@ -827,6 +828,21 @@ + + migration-tests + + false + + + false + true + true + true + true + true + + + integration-tests diff --git a/test/v2-migration-tests/pom.xml b/test/v2-migration-tests/pom.xml index 1d20e80d819b..74f2a3831e44 100644 --- a/test/v2-migration-tests/pom.xml +++ b/test/v2-migration-tests/pom.xml @@ -163,6 +163,17 @@ true + + maven-surefire-plugin + + + ${v2.migration.tests.skip} + + ${argLine} + false + 2 + + From b1a48e178707fe1e476492ebbd4ee2372ec6fa4a Mon Sep 17 00:00:00 2001 From: hdavidh Date: Wed, 7 May 2025 20:28:07 -0700 Subject: [PATCH 2/4] Separate migration tests from regular builds --- buildspecs/migration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildspecs/migration-test.yml b/buildspecs/migration-test.yml index 2728a23e09a6..c3968c316b0b 100644 --- a/buildspecs/migration-test.yml +++ b/buildspecs/migration-test.yml @@ -7,7 +7,7 @@ phases: build: commands: - - mvn clean install -pl :v2-migration-tests -P migration-tests -T1C $MAVEN_OPTIONS + - mvn clean install -pl :v2-migration-tests -am -P migration-tests -T1C $MAVEN_OPTIONS finally: - mkdir -p codebuild-test-reports - find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \; From d51e1460821694f9f4e12fc16f5d8f5780b00091 Mon Sep 17 00:00:00 2001 From: hdavidh Date: Wed, 7 May 2025 20:41:56 -0700 Subject: [PATCH 3/4] Separate migration tests from regular builds --- buildspecs/migration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildspecs/migration-test.yml b/buildspecs/migration-test.yml index c3968c316b0b..26b2222b9fe1 100644 --- a/buildspecs/migration-test.yml +++ b/buildspecs/migration-test.yml @@ -7,7 +7,7 @@ phases: build: commands: - - mvn clean install -pl :v2-migration-tests -am -P migration-tests -T1C $MAVEN_OPTIONS + - mvn clean install -pl :v2-migration-tests -P quick -am && mvn install -pl :v2-migration-tests -P migration-tests -T1C $MAVEN_OPTIONS finally: - mkdir -p codebuild-test-reports - find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \; From 5d2c1091845546232a4a9d6e73fdba93c33e70b0 Mon Sep 17 00:00:00 2001 From: hdavidh Date: Thu, 8 May 2025 09:25:37 -0700 Subject: [PATCH 4/4] Separate migration tests from regular builds --- buildspecs/migration-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildspecs/migration-test.yml b/buildspecs/migration-test.yml index 26b2222b9fe1..504cf4c1d074 100644 --- a/buildspecs/migration-test.yml +++ b/buildspecs/migration-test.yml @@ -7,7 +7,8 @@ phases: build: commands: - - mvn clean install -pl :v2-migration-tests -P quick -am && mvn install -pl :v2-migration-tests -P migration-tests -T1C $MAVEN_OPTIONS + - mvn clean install -pl :v2-migration-tests,:bom-internal -am -P quick $MAVEN_OPTIONS + - mvn install -pl :v2-migration-tests -P migration-tests -T2C $MAVEN_OPTIONS finally: - mkdir -p codebuild-test-reports - find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \;