From 04a48348c8f7d2a7b74c663956f2517c34078b74 Mon Sep 17 00:00:00 2001 From: Andy Kwok Date: Mon, 2 Dec 2024 11:00:51 -0800 Subject: [PATCH 1/5] Backport changes Signed-off-by: Andy Kwok --- .../workflows/integ-tests-with-security.yml | 18 +++++----- .github/workflows/sql-pitest.yml | 0 .../workflows/sql-test-and-build-workflow.yml | 35 ++++++++++--------- .github/workflows/sql-test-workflow.yml | 0 4 files changed, 29 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/sql-pitest.yml create mode 100644 .github/workflows/sql-test-workflow.yml diff --git a/.github/workflows/integ-tests-with-security.yml b/.github/workflows/integ-tests-with-security.yml index 753aff410e..00729baf60 100644 --- a/.github/workflows/integ-tests-with-security.yml +++ b/.github/workflows/integ-tests-with-security.yml @@ -28,14 +28,16 @@ jobs: # using the same image which is used by opensearch-build team to build the OpenSearch Distribution # this image tag is subject to change as more dependencies and updates will arrive over time image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} - # need to switch to root so that github actions can install runner binary on container without permission issues. - options: --user root + options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }} steps: - - uses: actions/checkout@v3 + - name: Run start commands + run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }} + + - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} @@ -47,7 +49,7 @@ jobs: - name: Upload test reports if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 continue-on-error: true with: name: test-reports-${{ matrix.os }}-${{ matrix.java }} @@ -66,10 +68,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} @@ -79,7 +81,7 @@ jobs: - name: Upload test reports if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 continue-on-error: true with: name: test-reports-${{ matrix.os }}-${{ matrix.java }} diff --git a/.github/workflows/sql-pitest.yml b/.github/workflows/sql-pitest.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/workflows/sql-test-and-build-workflow.yml b/.github/workflows/sql-test-and-build-workflow.yml index 92089589e0..7345c609a1 100644 --- a/.github/workflows/sql-test-and-build-workflow.yml +++ b/.github/workflows/sql-test-and-build-workflow.yml @@ -33,21 +33,21 @@ jobs: - 11 - 17 - 21 - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true runs-on: ubuntu-latest container: # using the same image which is used by opensearch-build team to build the OpenSearch Distribution # this image tag is subject to change as more dependencies and updates will arrive over time image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} - # need to switch to root so that github actions can install runner binary on container without permission issues. - options: --user root + options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }} steps: - - uses: actions/checkout@v3 + - name: Run start commands + run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }} + + - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} @@ -69,24 +69,26 @@ jobs: # This step uses the codecov-action Github action: https://github.com/codecov/codecov-action - name: Upload SQL Coverage Report - if: always() - uses: codecov/codecov-action@v3 + if: ${{ always() }} + uses: codecov/codecov-action@v4 + continue-on-error: true with: flags: sql-engine token: ${{ secrets.CODECOV_TOKEN }} - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 + continue-on-error: true with: - name: opensearch-sql-ubuntu-latest + name: opensearch-sql-ubuntu-latest-${{ matrix.java }} path: opensearch-sql-builds - name: Upload test reports - if: always() - uses: actions/upload-artifact@v3 + if: ${{ always() }} + uses: actions/upload-artifact@v4 continue-on-error: true with: - name: test-reports + name: test-reports-ubuntu-latest-${{ matrix.java }} path: | sql/build/reports/** ppl/build/reports/** @@ -113,10 +115,10 @@ jobs: runs-on: ${{ matrix.entry.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.entry.java }} @@ -130,7 +132,8 @@ jobs: cp -r ./plugin/build/distributions/*.zip opensearch-sql-builds/ - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 + continue-on-error: true with: name: opensearch-sql-${{ matrix.entry.os }} path: opensearch-sql-builds diff --git a/.github/workflows/sql-test-workflow.yml b/.github/workflows/sql-test-workflow.yml new file mode 100644 index 0000000000..e69de29bb2 From 3f5dddb1383b6e96fb3f1336a2312fa281649ffa Mon Sep 17 00:00:00 2001 From: Andy Kwok Date: Thu, 9 Jan 2025 10:23:23 -0800 Subject: [PATCH 2/5] Update diff Signed-off-by: Andy Kwok --- .github/workflows/integ-tests-with-security.yml | 4 ++-- .github/workflows/sql-test-and-build-workflow.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integ-tests-with-security.yml b/.github/workflows/integ-tests-with-security.yml index 00729baf60..272e082178 100644 --- a/.github/workflows/integ-tests-with-security.yml +++ b/.github/workflows/integ-tests-with-security.yml @@ -48,7 +48,7 @@ jobs: su `id -un 1000` -c "./gradlew integTestWithSecurity" - name: Upload test reports - if: ${{ always() }} + if: always() uses: actions/upload-artifact@v4 continue-on-error: true with: @@ -80,7 +80,7 @@ jobs: run: ./gradlew integTestWithSecurity - name: Upload test reports - if: ${{ always() }} + if: always() uses: actions/upload-artifact@v4 continue-on-error: true with: diff --git a/.github/workflows/sql-test-and-build-workflow.yml b/.github/workflows/sql-test-and-build-workflow.yml index 7345c609a1..966708fed1 100644 --- a/.github/workflows/sql-test-and-build-workflow.yml +++ b/.github/workflows/sql-test-and-build-workflow.yml @@ -69,7 +69,7 @@ jobs: # This step uses the codecov-action Github action: https://github.com/codecov/codecov-action - name: Upload SQL Coverage Report - if: ${{ always() }} + if: always() uses: codecov/codecov-action@v4 continue-on-error: true with: @@ -80,15 +80,15 @@ jobs: uses: actions/upload-artifact@v4 continue-on-error: true with: - name: opensearch-sql-ubuntu-latest-${{ matrix.java }} + name: opensearch-sql-ubuntu-latest path: opensearch-sql-builds - name: Upload test reports - if: ${{ always() }} + if: always() uses: actions/upload-artifact@v4 continue-on-error: true with: - name: test-reports-ubuntu-latest-${{ matrix.java }} + name: test-reports path: | sql/build/reports/** ppl/build/reports/** From 97c3739d1bad44590856b4708f19c6e219e8ccce Mon Sep 17 00:00:00 2001 From: Andy Kwok Date: Thu, 9 Jan 2025 10:25:52 -0800 Subject: [PATCH 3/5] Update diff Signed-off-by: Andy Kwok --- .github/workflows/integ-tests-with-security.yml | 4 ++-- .github/workflows/sql-test-and-build-workflow.yml | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integ-tests-with-security.yml b/.github/workflows/integ-tests-with-security.yml index 272e082178..00729baf60 100644 --- a/.github/workflows/integ-tests-with-security.yml +++ b/.github/workflows/integ-tests-with-security.yml @@ -48,7 +48,7 @@ jobs: su `id -un 1000` -c "./gradlew integTestWithSecurity" - name: Upload test reports - if: always() + if: ${{ always() }} uses: actions/upload-artifact@v4 continue-on-error: true with: @@ -80,7 +80,7 @@ jobs: run: ./gradlew integTestWithSecurity - name: Upload test reports - if: always() + if: ${{ always() }} uses: actions/upload-artifact@v4 continue-on-error: true with: diff --git a/.github/workflows/sql-test-and-build-workflow.yml b/.github/workflows/sql-test-and-build-workflow.yml index 966708fed1..11ccc3a50d 100644 --- a/.github/workflows/sql-test-and-build-workflow.yml +++ b/.github/workflows/sql-test-and-build-workflow.yml @@ -71,14 +71,12 @@ jobs: - name: Upload SQL Coverage Report if: always() uses: codecov/codecov-action@v4 - continue-on-error: true with: flags: sql-engine token: ${{ secrets.CODECOV_TOKEN }} - name: Upload Artifacts uses: actions/upload-artifact@v4 - continue-on-error: true with: name: opensearch-sql-ubuntu-latest path: opensearch-sql-builds @@ -133,7 +131,6 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v4 - continue-on-error: true with: name: opensearch-sql-${{ matrix.entry.os }} path: opensearch-sql-builds From ebdd589204ab635b22bf0984da4f04d6f57142da Mon Sep 17 00:00:00 2001 From: Andy Kwok Date: Thu, 9 Jan 2025 10:31:18 -0800 Subject: [PATCH 4/5] Bump action to v4 Signed-off-by: Andy Kwok --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/integ-tests-with-security.yml | 2 -- .github/workflows/link-checker.yml | 2 +- .github/workflows/maven-publish.yml | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 13c4ef0f60..fd51f00fe5 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/integ-tests-with-security.yml b/.github/workflows/integ-tests-with-security.yml index 00729baf60..ca83b3c5cd 100644 --- a/.github/workflows/integ-tests-with-security.yml +++ b/.github/workflows/integ-tests-with-security.yml @@ -21,8 +21,6 @@ jobs: fail-fast: false matrix: java: [ 11, 17, 21 ] - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true runs-on: ubuntu-latest container: # using the same image which is used by opensearch-build team to build the OpenSearch Distribution diff --git a/.github/workflows/link-checker.yml b/.github/workflows/link-checker.yml index cbc6dbec17..3bbaa686ce 100644 --- a/.github/workflows/link-checker.yml +++ b/.github/workflows/link-checker.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: lychee Link Checker id: lychee uses: lycheeverse/lychee-action@master diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 8adf7ae52c..0477ff7265 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -20,11 +20,11 @@ jobs: contents: write steps: - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: temurin # Temurin is a distribution of adoptium java-version: 11 - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: aws-actions/configure-aws-credentials@v1.7.0 with: role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }} From 06606eff50b2920f4a6d1eacdc6aa1ee780b4396 Mon Sep 17 00:00:00 2001 From: Andy Kwok Date: Thu, 9 Jan 2025 10:38:44 -0800 Subject: [PATCH 5/5] Remove redundent files Signed-off-by: Andy Kwok --- .github/workflows/sql-pitest.yml | 0 .github/workflows/sql-test-workflow.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .github/workflows/sql-pitest.yml delete mode 100644 .github/workflows/sql-test-workflow.yml diff --git a/.github/workflows/sql-pitest.yml b/.github/workflows/sql-pitest.yml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/.github/workflows/sql-test-workflow.yml b/.github/workflows/sql-test-workflow.yml deleted file mode 100644 index e69de29bb2..0000000000