Check Diff for flakiness #53
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: "Check Diff for flakiness" | |
| concurrency: | |
| group: ${{ github.head_ref }}-${{ github.sha }} | |
| cancel-in-progress: true | |
| on: | |
| schedule: | |
| - cron: "0 1 * * *" #UTC | |
| workflow_dispatch: | |
| inputs: | |
| community_core: | |
| type: boolean | |
| default: true | |
| description: "" | |
| coverage_core: | |
| type: boolean | |
| default: true | |
| description: "" | |
| debug_core: | |
| type: boolean | |
| default: true | |
| description: "" | |
| debug_integration: | |
| type: boolean | |
| default: true | |
| description: "" | |
| jepsen_core: | |
| type: boolean | |
| default: true | |
| description: "" | |
| release: | |
| description: 'Comma-separated list of release tests to run (e.g. core,benchmark,e2e,stress,query_modules)' | |
| default: 'core,e2e,stress,query_modules' | |
| malloc_build: | |
| type: boolean | |
| default: true | |
| flakiness_runs: | |
| type: number | |
| default: 3 | |
| required: true | |
| description: "Check for flakiness by running every selected job multiple times. Enter a number between 2 and 20." | |
| jobs: | |
| DiffSetup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| run_community_core: ${{ steps.setup.outputs.run_community_core }} | |
| run_coverage_core: ${{ steps.setup.outputs.run_coverage_core }} | |
| run_debug_core: ${{ steps.setup.outputs.run_debug_core }} | |
| run_debug_integration: ${{ steps.setup.outputs.run_debug_integration }} | |
| run_jepsen_core: ${{ steps.setup.outputs.run_jepsen_core }} | |
| run_release_core: ${{ steps.setup.outputs.run_release_core }} | |
| run_release_benchmark: ${{ steps.setup.outputs.run_release_benchmark}} | |
| run_release_e2e: ${{ steps.setup.outputs.run_release_e2e }} | |
| run_release_stress: ${{ steps.setup.outputs.run_release_stress }} | |
| run_release_query_modules: ${{ steps.setup.outputs.run_release_query_modules }} | |
| run_malloc_build: ${{ steps.setup.outputs.run_malloc_build }} | |
| runs: ${{ steps.setup_flakiness.outputs.runs }} | |
| env: | |
| GH_CONTEXT: ${{ toJson(github) }} | |
| GH_CONTEXT_FILE_NAME: github_context.json | |
| FLAKINESS_RUNS: ${{ github.event.inputs.flakiness_runs || 10 }} | |
| steps: | |
| - name: Set up repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Dump GitHub context | |
| run: echo "$GH_CONTEXT" >> "$GH_CONTEXT_FILE_NAME" | |
| - name: Set up diff execution | |
| id: setup | |
| run: ./tools/diff_setup.py --gh-context-path "$GH_CONTEXT_FILE_NAME" --base-branch "origin/master" | |
| - name: Set up flakiness runs | |
| id: setup_flakiness | |
| run: | | |
| if [[ $FLAKINESS_RUNS -lt 2 ]] || [[ $FLAKINESS_RUNS -gt 20 ]]; then | |
| echo "ERROR: Selected 'flakiness_runs' value is invalid. Please select a value between 2 and 20." | |
| exit 1 | |
| fi | |
| sequence="" | |
| for i in $(seq 1 $FLAKINESS_RUNS); do | |
| sequence+="${i}," | |
| done | |
| echo "runs=[${sequence::-1}]" >> $GITHUB_OUTPUT | |
| Community: | |
| needs: DiffSetup | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 3 | |
| matrix: | |
| run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }} | |
| uses: ./.github/workflows/diff_community.yaml | |
| with: | |
| arch: 'amd' | |
| os: 'ubuntu-24.04' | |
| toolchain: 'v6' | |
| run_core: ${{ needs.DiffSetup.outputs.run_community_core }} | |
| run_id: "${{ matrix.run_no }}" | |
| secrets: inherit | |
| Coverage: | |
| needs: DiffSetup | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 3 | |
| matrix: | |
| run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }} | |
| uses: ./.github/workflows/diff_coverage.yaml | |
| with: | |
| arch: 'amd' | |
| os: 'ubuntu-24.04' | |
| toolchain: 'v6' | |
| run_core: ${{ needs.DiffSetup.outputs.run_coverage_core }} | |
| run_clang_tidy: ${{ needs.DiffSetup.outputs.run_coverage_core }} | |
| run_id: "${{ matrix.run_no }}" | |
| secrets: inherit | |
| Debug: | |
| needs: DiffSetup | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 3 | |
| matrix: | |
| run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }} | |
| uses: ./.github/workflows/diff_debug.yaml | |
| with: | |
| arch: 'amd' | |
| os: 'ubuntu-24.04' | |
| toolchain: 'v6' | |
| run_core: ${{ needs.DiffSetup.outputs.run_debug_core }} | |
| run_integration: ${{ needs.DiffSetup.outputs.run_debug_integration }} | |
| run_id: "${{ matrix.run_no }}" | |
| secrets: inherit | |
| Jepsen: | |
| needs: DiffSetup | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 3 | |
| matrix: | |
| run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }} | |
| uses: ./.github/workflows/diff_jepsen.yaml | |
| with: | |
| run_core: ${{ needs.DiffSetup.outputs.run_jepsen_core }} | |
| run_id: "${{ matrix.run_no }}" | |
| secrets: inherit | |
| Release: | |
| needs: DiffSetup | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 3 | |
| matrix: | |
| run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }} | |
| uses: ./.github/workflows/diff_release.yaml | |
| with: | |
| arch: 'amd' | |
| os: 'ubuntu-24.04' | |
| toolchain: 'v6' | |
| run_core: ${{ needs.DiffSetup.outputs.run_release_core }} | |
| run_benchmark: ${{ needs.DiffSetup.outputs.run_release_benchmark =='true' && github.event_name == 'workflow_dispatch' }} | |
| run_e2e: ${{ needs.DiffSetup.outputs.run_release_e2e }} | |
| run_stress: ${{ needs.DiffSetup.outputs.run_release_stress }} | |
| run_query_modules: ${{ needs.DiffSetup.outputs.run_release_query_modules }} | |
| run_id: "${{ matrix.run_no }}" | |
| secrets: inherit | |
| Malloc: | |
| needs: DiffSetup | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 3 | |
| matrix: | |
| run_no: ${{ fromJSON(needs.DiffSetup.outputs.runs) }} | |
| uses: ./.github/workflows/diff_malloc.yaml | |
| with: | |
| arch: 'amd' | |
| os: 'ubuntu-24.04' | |
| toolchain: 'v6' | |
| run_build: ${{ needs.DiffSetup.outputs.run_malloc_build }} | |
| run_id: "${{ matrix.run_no }}" | |
| secrets: inherit |