From 890a61fa2a5ff810458ebdfe5737eb02a82b9f16 Mon Sep 17 00:00:00 2001 From: Philipp Page Date: Tue, 13 May 2025 17:46:20 +0200 Subject: [PATCH 1/6] fix(ci): Remove unused workflows and add JAVA_VERSION env var to e2e tests. --- .github/workflows/auto-merge.yml | 66 ----------------------- .github/workflows/check-e2e.yml | 4 +- .github/workflows/docs-v2-snapshot.yml | 40 -------------- .github/workflows/publish-v2-snapshot.yml | 29 ---------- 4 files changed, 3 insertions(+), 136 deletions(-) delete mode 100644 .github/workflows/auto-merge.yml delete mode 100644 .github/workflows/docs-v2-snapshot.yml delete mode 100644 .github/workflows/publish-v2-snapshot.yml diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml deleted file mode 100644 index 5401eedc9..000000000 --- a/.github/workflows/auto-merge.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Auto merge if dependabot PR - -on: - workflow_run: - workflows: ["Build"] - types: [completed] - -permissions: - pull-requests: write - issues: write - repository-projects: write - contents: write - -jobs: - merge-me: - name: Merge me! - runs-on: ubuntu-latest - if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' && github.actor == 'dependabot[bot]' - steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - uses: ahmadnassri/action-workflow-run-wait@2aa3d9e1a12ecaaa9908e368eaf2123bb084323e # v1.4.4 - with: - timeout: 300000 - - name: 'Download artifact' - uses: actions/github-script@47f7cf65b5ced0830a325f705cad64f2f58dddf7 # v3.1.0 - with: - script: | - var artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - var matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "pr" - })[0]; - var download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data)); - - run: unzip pr.zip - - name: Create review - uses: actions/github-script@47f7cf65b5ced0830a325f705cad64f2f58dddf7 # v3.1.0 - with: - script: | - var fs = require('fs'); - var issue_number = Number(fs.readFileSync('./NR')); - - github.pulls.createReview({ - owner: context.payload.repository.owner.login, - repo: context.payload.repository.name, - pull_number: issue_number, - event: 'APPROVE' - }) - - github.pulls.merge({ - owner: context.payload.repository.owner.login, - repo: context.payload.repository.name, - pull_number: issue_number, - merge_method: 'squash' - }) - - github-token: ${{ secrets.AUTOMERGE }} diff --git a/.github/workflows/check-e2e.yml b/.github/workflows/check-e2e.yml index 6420cd6f7..26cd00e33 100644 --- a/.github/workflows/check-e2e.yml +++ b/.github/workflows/check-e2e.yml @@ -68,4 +68,6 @@ jobs: role-to-assume: ${{ secrets.AWS_IAM_ROLE }} aws-region: us-east-1 - name: Run e2e test with Maven - run: mvn -DskipTests install --file pom.xml && mvn -Pe2e -B verify --file powertools-e2e-tests/pom.xml \ No newline at end of file + env: + JAVA_VERSION: ${{ matrix.java }} + run: mvn -DskipTests install --file pom.xml && mvn -Pe2e -B verify --file powertools-e2e-tests/pom.xml diff --git a/.github/workflows/docs-v2-snapshot.yml b/.github/workflows/docs-v2-snapshot.yml deleted file mode 100644 index 55803c737..000000000 --- a/.github/workflows/docs-v2-snapshot.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Docs -on: - push: - branches: - - v2 - workflow_dispatch: {} - -permissions: - id-token: write - contents: write - pages: write - -jobs: - docs: - runs-on: ubuntu-latest - environment: Docs - steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - name: Set up Python - uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1 - with: - python-version: "3.8" - - name: Capture branch and tag - id: branch_name - run: | - echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - - name: Build docs website - run: | - make build-docs-website - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef - with: - aws-region: us-east-1 - role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }} - - name: Deploy Docs - run: | - aws s3 sync \ - dist \ - s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-java/preview/ diff --git a/.github/workflows/publish-v2-snapshot.yml b/.github/workflows/publish-v2-snapshot.yml deleted file mode 100644 index d5a683261..000000000 --- a/.github/workflows/publish-v2-snapshot.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Publish v2 -on: - push: - branches: - - v2 - workflow_dispatch: {} -jobs: - publish: - runs-on: ubuntu-latest - environment: snapshot - steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - name: Set up Maven Central Repository - uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0 - with: - distribution: 'corretto' - java-version: 11 - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - # TODO: use environments https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment - gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} # Value of the GPG private key to import - gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase - - name: Publish package - run: mvn -Prelease clean validate deploy -DskipTests # We use validate here to run maven enforcer, to make sure we are only publishing SNAPSHOT builds - env: - MAVEN_USERNAME: ${{ secrets.SNAPSHOT_PUBLISH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.SNAPSHOT_PUBLISH_PASSWORD }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} From b7c78ef480d568e4279b497aa4521222cae76b9b Mon Sep 17 00:00:00 2001 From: Philipp Page Date: Wed, 14 May 2025 10:04:39 +0200 Subject: [PATCH 2/6] Test e2e test for Java 11 only. --- .github/workflows/check-e2e.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/check-e2e.yml b/.github/workflows/check-e2e.yml index 26cd00e33..87412d3e5 100644 --- a/.github/workflows/check-e2e.yml +++ b/.github/workflows/check-e2e.yml @@ -52,8 +52,7 @@ jobs: matrix: java: - 11 - - 17 - - 21 + steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Setup java From 06648527c86be6e2616173d396db751dbe8e51f9 Mon Sep 17 00:00:00 2001 From: Philipp Page Date: Thu, 15 May 2025 17:19:23 +0200 Subject: [PATCH 3/6] Debug Parameteres E2E test only. --- powertools-e2e-tests/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powertools-e2e-tests/pom.xml b/powertools-e2e-tests/pom.xml index 306e8060b..a1837595e 100644 --- a/powertools-e2e-tests/pom.xml +++ b/powertools-e2e-tests/pom.xml @@ -218,7 +218,7 @@ 1 - **/*E2ET.java + **/ParametersE2ET.java From 0bc007fb15242f09375523c771cb61e440919aaa Mon Sep 17 00:00:00 2001 From: Philipp Page Date: Thu, 15 May 2025 17:32:38 +0200 Subject: [PATCH 4/6] Revert "Debug Parameteres E2E test only." This reverts commit 06648527c86be6e2616173d396db751dbe8e51f9. --- powertools-e2e-tests/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powertools-e2e-tests/pom.xml b/powertools-e2e-tests/pom.xml index a1837595e..306e8060b 100644 --- a/powertools-e2e-tests/pom.xml +++ b/powertools-e2e-tests/pom.xml @@ -218,7 +218,7 @@ 1 - **/ParametersE2ET.java + **/*E2ET.java From 3f0311fb97077f688f24f2fee5ea1cc37bcc3739 Mon Sep 17 00:00:00 2001 From: Philipp Page Date: Fri, 16 May 2025 14:06:34 +0200 Subject: [PATCH 5/6] Exlucde TracingE2ET for testing. --- powertools-e2e-tests/pom.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/powertools-e2e-tests/pom.xml b/powertools-e2e-tests/pom.xml index 306e8060b..9cb604f56 100644 --- a/powertools-e2e-tests/pom.xml +++ b/powertools-e2e-tests/pom.xml @@ -14,8 +14,8 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 powertools-parent @@ -216,10 +216,14 @@ - 1 + 1 **/*E2ET.java + + **/TracingE2ET.java + From 0fa516bf22b8af07492463089bc5d0d3e0c349a7 Mon Sep 17 00:00:00 2001 From: Philipp Page Date: Fri, 16 May 2025 14:56:31 +0200 Subject: [PATCH 6/6] Enable Java version matrix again. --- .github/workflows/check-e2e.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-e2e.yml b/.github/workflows/check-e2e.yml index 87412d3e5..14eab5394 100644 --- a/.github/workflows/check-e2e.yml +++ b/.github/workflows/check-e2e.yml @@ -52,6 +52,8 @@ jobs: matrix: java: - 11 + - 17 + - 21 steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3