From 49ca9a18656ff93021e0fb839a71cf3e3452ee10 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Fri, 13 Oct 2023 19:39:03 +0000 Subject: [PATCH 01/11] Collect all coverage data at once Signed-off-by: Peter Nied --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73d1f12f4c..2a7d3bb3c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,17 +60,6 @@ jobs: arguments: | ${{ matrix.gradle_task }} -Dbuild.snapshot=false - - name: Coverage - uses: Wandalen/wretry.action@v1.3.0 - with: - attempt_limit: 3 - attempt_delay: 2000 - action: codecov/codecov-action@v3 - with: | - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: false - files: ./build/reports/jacoco/test/jacocoTestReport.xml - - uses: actions/upload-artifact@v3 if: always() with: @@ -78,9 +67,30 @@ jobs: path: | ./build/reports/ - - name: check archive for debugging - if: always() - run: echo "Check the artifact ${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports for detailed test results" + report-coverage: + needs: + - "test" + - "integration-tests" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/download-artifact@v3 + + - name: Display structure of downloaded files + run: ls -R + + - name: Upload Coverage with retry + uses: Wandalen/wretry.action@v1.3.0 + with: + attempt_limit: 3 + attempt_delay: 2000 + action: codecov/codecov-action@v3 + with: | + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false + files: ./build/reports/jacoco/test/jacocoTestReport.xml + integration-tests: name: integration-tests @@ -108,6 +118,14 @@ jobs: arguments: | integrationTest -Dbuild.snapshot=false + - uses: actions/upload-artifact@v3 + if: always() + with: + name: integration-${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports + path: | + ./build/reports/ + + resource-tests: env: CI_ENVIRONMENT: resource-test From c402475ee11827ae0f83ad13999c58551e311fd1 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Tue, 17 Oct 2023 05:16:24 -0500 Subject: [PATCH 02/11] Make sure code coverage information is included in integration test runs Signed-off-by: Peter Nied --- .github/workflows/ci.yml | 8 ++++---- build.gradle | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a7d3bb3c3..9fca58e20a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: - uses: actions/upload-artifact@v3 if: always() with: - name: ${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports + name: ${{ matrix.platform }}-JDK${{ matrix.jdk }}-${{ matrix.gradle_task }}-reports path: | ./build/reports/ @@ -83,13 +83,13 @@ jobs: - name: Upload Coverage with retry uses: Wandalen/wretry.action@v1.3.0 with: - attempt_limit: 3 + attempt_limit: 5 attempt_delay: 2000 action: codecov/codecov-action@v3 with: | token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: false - files: ./build/reports/jacoco/test/jacocoTestReport.xml + fail_ci_if_error: true + files: ./*/jacoco/test/jacocoTestReport.xml integration-tests: diff --git a/build.gradle b/build.gradle index cd52eae700..723d38f6cc 100644 --- a/build.gradle +++ b/build.gradle @@ -486,6 +486,21 @@ task integrationTest(type: Test) { classpath = sourceSets.integrationTest.runtimeClasspath //run the integrationTest task after the test task shouldRunAfter test + jacoco { + excludes = [ + "com.sun.jndi.dns.*", + "com.sun.security.sasl.gsskerb.*", + "java.sql.*", + "javax.script.*", + "org.jcp.xml.dsig.internal.dom.*", + "sun.nio.cs.ext.*", + "sun.security.ec.*", + "sun.security.jgss.*", + "sun.security.pkcs11.*", + "sun.security.smartcardio.*", + "sun.util.resources.provider.*" + ] + } } //run the integrationTest task before the check task From 4e19530baa1ccd7463d4fabe25f92605389b7811 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Tue, 17 Oct 2023 06:53:28 -0500 Subject: [PATCH 03/11] Change blob format for picking up code coverage files Signed-off-by: Peter Nied --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fca58e20a..c814d783ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: with: | token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true - files: ./*/jacoco/test/jacocoTestReport.xml + files: ./**/jacoco/test/jacocoTestReport.xml integration-tests: From 75401238e660e9d13e2b116f1e0079f9ebc67d4f Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Tue, 17 Oct 2023 09:07:28 -0500 Subject: [PATCH 04/11] Download into subdirectory and more logging Signed-off-by: Peter Nied --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c814d783ad..f65c34d638 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,12 +73,13 @@ jobs: - "integration-tests" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + with: + path: downloaded-artifacts - name: Display structure of downloaded files run: ls -R + working-directory: downloaded-artifacts - name: Upload Coverage with retry uses: Wandalen/wretry.action@v1.3.0 @@ -89,7 +90,8 @@ jobs: with: | token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true - files: ./**/jacoco/test/jacocoTestReport.xml + directory: downloaded-artifacts + verbose: true integration-tests: From 33eca5ba7d9ebed1c10f9cac5c8dd874a67fe14e Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Fri, 20 Oct 2023 12:16:15 +0000 Subject: [PATCH 05/11] Use faster upload/download arctifact process Signed-off-by: Peter Nied --- .github/actions/run-bwc-suite/action.yaml | 2 +- .github/workflows/ci.yml | 6 +++--- .github/workflows/integration-tests.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/run-bwc-suite/action.yaml b/.github/actions/run-bwc-suite/action.yaml index 6e6a17fb3f..ad87f7316c 100644 --- a/.github/actions/run-bwc-suite/action.yaml +++ b/.github/actions/run-bwc-suite/action.yaml @@ -50,7 +50,7 @@ runs: -Dbwc.version.next=${{ steps.build-next.outputs.built-version }} -i build-root-directory: bwc-test - - uses: actions/upload-artifact@v3 + - uses: alehechka/upload-tartifact@v2 if: always() with: name: ${{ inputs.report-artifact-name }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a7d3bb3c3..26a0a14e40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: arguments: | ${{ matrix.gradle_task }} -Dbuild.snapshot=false - - uses: actions/upload-artifact@v3 + - uses: alehechka/upload-tartifact@v2 if: always() with: name: ${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports @@ -75,7 +75,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + - uses: alehechka/download-tartifact@v2 - name: Display structure of downloaded files run: ls -R @@ -118,7 +118,7 @@ jobs: arguments: | integrationTest -Dbuild.snapshot=false - - uses: actions/upload-artifact@v3 + - uses: alehechka/upload-tartifact@v2 if: always() with: name: integration-${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index eb11d0e478..d514cef017 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -24,7 +24,7 @@ jobs: - run: OPENDISTRO_SECURITY_TEST_OPENSSL_OPT=true ./gradlew test - - uses: actions/upload-artifact@v3 + - uses: alehechka/upload-tartifact@v2 if: always() with: name: ${{ matrix.jdk }}-${{ matrix.test-run }}-reports From 91bef9f9e53e2d007f1513ba80e7ddf2f6954ae0 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Fri, 20 Oct 2023 14:01:21 +0000 Subject: [PATCH 06/11] Extract and process artifacts Signed-off-by: Peter Nied --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ad0d63f1c..8753fda5f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,10 +73,13 @@ jobs: - "integration-tests" runs-on: ubuntu-latest steps: - - uses: alehechka/download-tartifact@v2 + - uses: actions/download-artifact@v3 with: path: downloaded-artifacts + - name: Extract downloaded artifacts + run: tar -xvf downloaded-artifacts/* + - name: Display structure of downloaded files run: ls -R working-directory: downloaded-artifacts From 1ca75f6ac16a38d5f9cd9be59f05aca01e80e8eb Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Fri, 20 Oct 2023 15:27:17 +0000 Subject: [PATCH 07/11] On donwload files are extracted? Signed-off-by: Peter Nied --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8753fda5f1..212d0bfd17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,9 +77,6 @@ jobs: with: path: downloaded-artifacts - - name: Extract downloaded artifacts - run: tar -xvf downloaded-artifacts/* - - name: Display structure of downloaded files run: ls -R working-directory: downloaded-artifacts From 2f26894d634aa558bca94d85cbcb5fb6a8195ce3 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Fri, 20 Oct 2023 22:08:12 +0000 Subject: [PATCH 08/11] extract artifacts Signed-off-by: Peter Nied --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 212d0bfd17..6f0f00e4d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,6 +77,9 @@ jobs: with: path: downloaded-artifacts + - name: Extract downloaded artifacts + run: tar -xvf downloaded-artifacts/*/artifact.tar + - name: Display structure of downloaded files run: ls -R working-directory: downloaded-artifacts From b66af9556b9deeb670e6973f97ec05a24eecf02e Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Mon, 23 Oct 2023 21:19:04 +0000 Subject: [PATCH 09/11] Display more of the structure before the failure Signed-off-by: Peter Nied --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f0f00e4d2..1f75d8fe4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,6 +77,10 @@ jobs: with: path: downloaded-artifacts + - name: Display structure of downloaded files + run: ls -R + working-directory: downloaded-artifacts + - name: Extract downloaded artifacts run: tar -xvf downloaded-artifacts/*/artifact.tar From 44c40217306019d160a79ec321d7867f306534aa Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Tue, 24 Oct 2023 18:34:00 +0000 Subject: [PATCH 10/11] Rearrange working directory Signed-off-by: Peter Nied --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f75d8fe4a..dca6fe2895 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,8 @@ jobs: working-directory: downloaded-artifacts - name: Extract downloaded artifacts - run: tar -xvf downloaded-artifacts/*/artifact.tar + run: tar -xvf ./*/artifact.tar + working-directory: downloaded-artifacts - name: Display structure of downloaded files run: ls -R From c011f3adc435dbb377c1fdc7ac133d844c4e16c8 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Tue, 24 Oct 2023 20:11:23 +0000 Subject: [PATCH 11/11] scan subfolders of tar files and then decompress Signed-off-by: Peter Nied --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dca6fe2895..3f08695275 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,10 @@ jobs: working-directory: downloaded-artifacts - name: Extract downloaded artifacts - run: tar -xvf ./*/artifact.tar + run: | + for archive in ./*/artifact.tar; do + (cd "$(dirname "$archive")" && tar -xvf artifact.tar) + done working-directory: downloaded-artifacts - name: Display structure of downloaded files