Repository navigation
fix(async-ppl): Return the job id for wait=0 when the engine fails first #17898
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SQL Java CI | |
| on: | |
| pull_request: | |
| push: | |
| branches-ignore: | |
| - 'backport/**' | |
| - 'dependabot/**' | |
| paths: | |
| - '**/*.java' | |
| - '**/*.g4' | |
| - '!sql-jdbc/**' | |
| - '**gradle*' | |
| - '**lombok*' | |
| - 'integ-test/**' | |
| - '**/*.jar' | |
| - '**/*.pom' | |
| - '.github/workflows/sql-test-and-build-workflow.yml' | |
| merge_group: | |
| jobs: | |
| compile-linux: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [21, 25] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'gradle' | |
| - name: Compile | |
| run: | | |
| ./gradlew assemble compileTestJava dependencies --no-daemon | |
| compile-windows-macos: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| entry: | |
| - { os: windows-latest, java: 21, os_build_args: -PbuildPlatform=windows } | |
| - { os: windows-latest, java: 25, os_build_args: -PbuildPlatform=windows } | |
| - { os: macos-latest, java: 21, os_build_args: '' } | |
| - { os: macos-latest, java: 25, os_build_args: '' } | |
| runs-on: ${{ matrix.entry.os }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up JDK ${{ matrix.entry.java }} | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.entry.java }} | |
| cache: 'gradle' | |
| - name: Compile | |
| run: ./gradlew assemble compileTestJava dependencies --no-daemon ${{ matrix.entry.os_build_args }} | |
| shell: bash | |
| spotless: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| cache: 'gradle' | |
| - name: Spotless Check | |
| run: | | |
| # include dependencies since this will probably be the first gradle-cached action to finis | |
| # others also use it in case this one is slow | |
| ./gradlew spotlessCheck dependencies --no-daemon | |
| build-linux: | |
| needs: [compile-linux] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [21, 25] | |
| test-type: ['unit', 'integration', 'doc'] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'gradle' | |
| - name: Build and Test | |
| run: | | |
| if [ "${{ matrix.test-type }}" = "unit" ]; then | |
| ./gradlew --continue build jacocoAggregatedReport -x spotlessCheck -x integTest -x tracingIntegTest -x yamlRestTest -x doctest | |
| elif [ "${{ matrix.test-type }}" = "integration" ]; then | |
| coverage_args="" | |
| if [ "${{ matrix.java }}" = "21" ]; then | |
| coverage_args="-Dtests.coverage=true jacocoIntegTestReport" | |
| fi | |
| ./gradlew --continue integTest tracingIntegTest yamlRestTest mappingConflictIntegTest $coverage_args | |
| else | |
| ./gradlew --continue doctest | |
| fi | |
| - name: Create Artifact Path | |
| if: ${{ matrix.test-type == 'unit' }} | |
| run: | | |
| mkdir -p opensearch-sql-builds | |
| cp -r ./plugin/build/distributions/*.zip opensearch-sql-builds/ | |
| - name: Upload SQL Coverage Report Artifact | |
| if: ${{ !cancelled() && matrix.test-type == 'unit' && matrix.java == 21 }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: jacoco-coverage-reports | |
| path: build/reports/jacoco/jacocoAggregatedReport/jacocoAggregatedReport.xml | |
| retention-days: 1 | |
| if-no-files-found: error | |
| - name: Upload SQL Integration Test Coverage Report Artifact | |
| if: ${{ !cancelled() && matrix.test-type == 'integration' && matrix.java == 21 }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: jacoco-integ-test-coverage-reports | |
| path: build/reports/jacoco/jacocoIntegTestReport/jacocoIntegTestReport.xml | |
| retention-days: 1 | |
| if-no-files-found: error | |
| - name: Upload Artifacts | |
| if: ${{ matrix.test-type == 'unit' }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| continue-on-error: true | |
| with: | |
| name: opensearch-sql-ubuntu-latest-${{ matrix.java }} | |
| path: opensearch-sql-builds | |
| - name: Upload test reports | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| continue-on-error: true | |
| with: | |
| name: test-reports-ubuntu-latest-${{ matrix.java }}-${{ matrix.test-type }} | |
| path: | | |
| sql/build/reports/** | |
| ppl/build/reports/** | |
| core/build/reports/** | |
| common/build/reports/** | |
| opensearch/build/reports/** | |
| integ-test/build/reports/** | |
| protocol/build/reports/** | |
| legacy/build/reports/** | |
| plugin/build/reports/** | |
| doctest/build/testclusters/docTestCluster-0/logs/* | |
| integ-test/build/testclusters/*/logs/* | |
| upload-coverage: | |
| needs: build-linux | |
| name: Upload SQL coverage report to Codecov | |
| if: ${{ !cancelled() && github.repository == 'opensearch-project/sql' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Download unit test coverage report | |
| id: download-unit-coverage | |
| continue-on-error: true | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: jacoco-coverage-reports | |
| path: coverage/unit | |
| - name: Download integration test coverage report | |
| id: download-integ-test-coverage | |
| continue-on-error: true | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 | |
| with: | |
| name: jacoco-integ-test-coverage-reports | |
| path: coverage/integration | |
| - name: Upload unit test coverage to Codecov | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| if: steps.download-unit-coverage.outcome == 'success' | |
| with: | |
| flags: unit | |
| directory: coverage/unit | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload integration test coverage to Codecov | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| if: steps.download-integ-test-coverage.outcome == 'success' | |
| with: | |
| flags: integration | |
| directory: coverage/integration | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| build-windows-macos: | |
| needs: compile-windows-macos | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| entry: | |
| - { os: windows-latest, java: 21, os_build_args: -PbuildPlatform=windows } | |
| - { os: windows-latest, java: 25, os_build_args: -PbuildPlatform=windows } | |
| - { os: macos-latest, java: 21, os_build_args: '' } | |
| - { os: macos-latest, java: 25, os_build_args: '' } | |
| test-type: ['unit', 'integration', 'doc'] | |
| exclude: | |
| # Exclude doctest for Windows | |
| - test-type: doc | |
| entry: { os: windows-latest, java: 21, os_build_args: -PbuildPlatform=windows } | |
| - test-type: doc | |
| entry: { os: windows-latest, java: 25, os_build_args: -PbuildPlatform=windows } | |
| runs-on: ${{ matrix.entry.os }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up JDK ${{ matrix.entry.java }} | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.entry.java }} | |
| cache: 'gradle' | |
| - name: Build and Test | |
| run: | | |
| if [ "${{ matrix.test-type }}" = "unit" ]; then | |
| ./gradlew --continue build -x spotlessCheck -x integTest -x tracingIntegTest -x yamlRestTest -x doctest ${{ matrix.entry.os_build_args }} | |
| elif [ "${{ matrix.test-type }}" = "integration" ]; then | |
| ./gradlew --continue integTest tracingIntegTest yamlRestTest mappingConflictIntegTest ${{ matrix.entry.os_build_args }} | |
| else | |
| ./gradlew --continue doctest ${{ matrix.entry.os_build_args }} | |
| fi | |
| shell: bash | |
| - name: Create Artifact Path | |
| if: ${{ matrix.test-type == 'unit' }} | |
| run: | | |
| mkdir -p opensearch-sql-builds | |
| cp -r ./plugin/build/distributions/*.zip opensearch-sql-builds/ | |
| - name: Upload Artifacts | |
| if: ${{ matrix.test-type == 'unit' }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| continue-on-error: true | |
| with: | |
| name: opensearch-sql-${{ matrix.entry.os }}-${{ matrix.entry.java }} | |
| path: opensearch-sql-builds | |
| - name: Upload test reports | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| continue-on-error: true | |
| with: | |
| name: test-reports-${{ matrix.entry.os }}-${{ matrix.entry.java }}-${{ matrix.test-type }} | |
| path: | | |
| sql/build/reports/** | |
| ppl/build/reports/** | |
| core/build/reports/** | |
| common/build/reports/** | |
| opensearch/build/reports/** | |
| integ-test/build/reports/** | |
| protocol/build/reports/** | |
| legacy/build/reports/** | |
| plugin/build/reports/** | |
| doctest/build/testclusters/docTestCluster-0/logs/* | |
| integ-test/build/testclusters/*/logs/* | |
| bwc-tests-rolling-upgrade: | |
| needs: [compile-linux] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java: [21, 25] | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'gradle' | |
| - name: Run backward compatibility tests in rolling upgrade | |
| run: | | |
| ./scripts/bwctest-rolling-upgrade.sh | |
| - name: Upload test reports | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| continue-on-error: true | |
| with: | |
| name: test-reports-ubuntu-latest-${{ matrix.java }}-bwc | |
| path: | | |
| sql/build/reports/** | |
| ppl/build/reports/** | |
| core/build/reports/** | |
| common/build/reports/** | |
| opensearch/build/reports/** | |
| integ-test/build/reports/** | |
| protocol/build/reports/** | |
| legacy/build/reports/** | |
| plugin/build/reports/** | |
| doctest/build/testclusters/docTestCluster-0/logs/* | |
| integ-test/build/testclusters/*/logs/* | |
| bwc-tests-full-restart: | |
| needs: [compile-linux] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java: [21, 25] | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'gradle' | |
| - name: Run backward compatibility tests in full restart | |
| run: | | |
| ./scripts/bwctest-full-restart.sh | |
| - name: Upload test reports | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| continue-on-error: true | |
| with: | |
| name: test-reports-ubuntu-latest-${{ matrix.java }}-bwc-full-restart | |
| path: | | |
| sql/build/reports/** | |
| ppl/build/reports/** | |
| core/build/reports/** | |
| common/build/reports/** | |
| opensearch/build/reports/** | |
| integ-test/build/reports/** | |
| protocol/build/reports/** | |
| legacy/build/reports/** | |
| plugin/build/reports/** | |
| doctest/build/testclusters/docTestCluster-0/logs/* | |
| integ-test/build/testclusters/*/logs/* | |
| security-it-linux: | |
| needs: [compile-linux] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| java: [21, 25] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'gradle' | |
| - name: Run security integration tests | |
| run: | | |
| ./gradlew integTestWithSecurity | |
| - name: Upload test reports | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| continue-on-error: true | |
| with: | |
| name: test-reports-ubuntu-latest-${{ matrix.java }}-security-it | |
| path: | | |
| integ-test/build/reports/** | |
| integ-test/build/testclusters/*/logs/* | |
| integ-test/build/testclusters/*/config/* | |
| security-it-windows-macos: | |
| needs: compile-windows-macos | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ windows-latest, macos-latest ] | |
| java: [21, 25] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'gradle' | |
| - name: Run security integration tests | |
| run: ./gradlew integTestWithSecurity | |
| - name: Upload test reports | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| continue-on-error: true | |
| with: | |
| name: test-reports-${{ matrix.os }}-${{ matrix.java }}-security-it | |
| path: | | |
| integ-test/build/reports/** | |
| integ-test/build/testclusters/*/logs/* | |
| integ-test/build/testclusters/*/config/* |