Skip to content

Avoid a case where the planner was erroneously dropping predicates #4114

Avoid a case where the planner was erroneously dropping predicates

Avoid a case where the planner was erroneously dropping predicates #4114

Workflow file for this run

name: Pull Request
on:
pull_request:
types: [opened, reopened, synchronize]
permissions:
contents: read
jobs:
# Multiple parallel jobs:
# 1. style: Runs all checks on the build (including compilation static analysis) except the tests
# This allows us to catch anything related to build and style faster, as we don't have to wait
# on tests to complete. It also allows the test jobs to continue even if there's a style failure.
# 2. tests: Runs the tests for a subset of subprojects in parallel. These are the most intensive
# subprojects, so separating them out allows us to run those parts of the build in parallel, and
# it also allows us to ensure they get run even if there are failures in other subprojects,
# giving us more insight into the types of test failures that a PR might have induced.
# 3. other-tests: Runs the rest of the tests. This tests all the remaining subprojects.
# 4. coverage: Merges the JaCoCo output of 2 and 3 and generates reports.
style:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
pull-requests: write
timeout-minutes: 30
steps:
- name: Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: Run Gradle Build
uses: ./actions/run-gradle
with:
gradle_command: build -x test -x destructiveTest -PreleaseBuild=false -PpublishBuild=false -PspotbugsEnableHtmlReport
tests:
strategy:
matrix:
subproject: [fdb-extensions, fdb-record-layer-core, fdb-record-layer-lucene, yaml-tests]
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
pull-requests: write
timeout-minutes: 40
steps:
- name: Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: Setup FDB
uses: ./actions/setup-fdb
- name: Run Gradle Test
uses: ./actions/gradle-test
with:
gradle_command: :${{ matrix.subproject }}:jar :${{ matrix.subproject }}:test :${{ matrix.subproject }}:destructiveTest
gradle_args: -PreleaseBuild=false -PpublishBuild=false
report_name: ${{ matrix.subproject }}-test-reports
- name: Publish Coverage Data
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ matrix.subproject }}-coverage-data
path: |
**/.out/jacoco/*.exec
**/.out/libs/*.jar
include-hidden-files: true
retention-days: 1
other-tests:
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
pull-requests: write
timeout-minutes: 60
steps:
- name: Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Base Environment
uses: ./actions/setup-base-env
- name: Setup FDB
uses: ./actions/setup-fdb
- name: Run Gradle Test
uses: ./actions/gradle-test
with:
gradle_command: >-
jar
test
-x :fdb-extensions:test
-x :fdb-record-layer-core:test
-x :fdb-record-layer-lucene:test
-x :yaml-tests:test
destructiveTest
-x :fdb-extensions:destructiveTest
-x :fdb-record-layer-core:destructiveTest
-x :fdb-record-layer-lucene:destructiveTest
-x :yaml-tests:destructiveTest
gradle_args: -PreleaseBuild=false -PpublishBuild=false
report_name: other-test-reports
- name: Publish Coverage Data
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: other-coverage-data
path: |
**/.out/jacoco/*.exec
**/.out/libs/*.jar
include-hidden-files: true
retention-days: 1
coverage:
needs: [tests, other-tests]
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
pull-requests: read
timeout-minutes: 10
steps:
- name: Checkout HEAD sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Base Environment
uses: ./actions/setup-base-env
# It looks like, if you try to download them all as a pattern, the nested directories get stripped
# so the coverage data (for e.g. lucene) does not end up in the appropirate subproject directory
- name: 'Download lucene'
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: fdb-record-layer-lucene-coverage-data
- name: 'Download extensions'
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: fdb-extensions-coverage-data
- name: 'Download core'
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: fdb-record-layer-core-coverage-data
- name: 'Download yaml'
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: yaml-tests-coverage-data
- name: 'Download other'
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
name: other-coverage-data
- name: Run JaCoCo Report
uses: ./actions/run-gradle
with:
gradle_command: codeCoverageReport
- name: Publish Coverage Report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-report
path: |
${{ github.workspace }}/.out/reports/jacoco/codeCoverageReport/
- name: Get PR Diff
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr diff ${{ github.event.pull_request.number }} > pr_diff.patch
- name: Annotate Coverage
run: |
python3 build/coverage_annotations.py \
--report .out/reports/jacoco/codeCoverageReport/codeCoverageReport.xml \
--diff pr_diff.patch