From f69148dd9c91dc4d17d3a382f988bb3a39a63097 Mon Sep 17 00:00:00 2001 From: Aditya Mukhopadhyay Date: Mon, 30 Nov 2026 18:37:16 +0530 Subject: [PATCH] ci: make the property-test and NFS lock nightlies match the other v3 nightlies (#940) Use the same header and dispatch input as bench.yml/crash-kill.yml, name the ref in failure-issue titles so main and v3 failures are tracked separately, and fail a scheduled v3 property-test run whose checkout has no model_based_test instead of skipping it silently (as smoke.yml does for the v3 acceptance suite). Scheduled runs check out the branch head. Refs #940. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01H2a7QngaFzuCVt5umd1qoh --- .github/workflows/nfs-lock.yml | 24 +++++++++++++-------- .github/workflows/property-tests.yml | 31 ++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/.github/workflows/nfs-lock.yml b/.github/workflows/nfs-lock.yml index 98b87eae7e..eddfccc5d0 100644 --- a/.github/workflows/nfs-lock.yml +++ b/.github/workflows/nfs-lock.yml @@ -6,9 +6,16 @@ name: NFS/Docker lock tests (nightly) # reach how `std::fs::File::try_lock` behaves on a network filesystem or in # real containers. See #324. -# Schedules use the default branch workflow; keep both branch copies identical. -# At #937, remap the schedules to main/v2.x and update TEST_REF/run-name. -run-name: NFS/Docker lock tests (${{ github.event_name == 'workflow_dispatch' && inputs.ref || (github.event.schedule == '17 21 * * *' && 'v3' || 'main') }}) +# Two branches alternate every 12 hours: main at 09:17 UTC, v3 at 21:17 UTC. +# Scheduled runs always use this file from the default branch, so the branch +# under test is chosen from the cron string that fired (as in bench.yml and +# crash-kill.yml). Each scheduled run checks out the branch head, its latest +# commit. Keep the cron strings here and in TEST_REF/run-name identical, and +# keep this file the same on main and v3. At #937, remap the schedules to +# main/v2.x. +run-name: >- + NFS/Docker lock tests (${{ github.event_name == 'workflow_dispatch' && inputs.ref + || (github.event.schedule == '17 21 * * *' && 'v3' || 'main') }}) on: schedule: @@ -18,8 +25,7 @@ on: workflow_dispatch: inputs: ref: - description: Branch, tag or SHA to test - type: string + description: Branch to test required: true default: main @@ -91,7 +97,7 @@ jobs: shell: bash env: GH_TOKEN: ${{ github.token }} - ISSUE_TITLE: "Nightly NFS lock-suite failure" + ISSUE_TITLE: "Nightly NFS lock-suite failure (${{ env.TEST_REF }})" run: | report_file="nfs-lock-failure.md" { @@ -120,7 +126,7 @@ jobs: --search "$ISSUE_TITLE in:title" \ --json number,title \ --limit 100 \ - --jq '.[] | select(.title == "Nightly NFS lock-suite failure") | .number' \ + --jq ".[] | select(.title == \"$ISSUE_TITLE\") | .number" \ | head -n 1)" if [ -n "$existing_issue" ]; then @@ -158,7 +164,7 @@ jobs: shell: bash env: GH_TOKEN: ${{ github.token }} - ISSUE_TITLE: "Nightly Docker lock-suite failure" + ISSUE_TITLE: "Nightly Docker lock-suite failure (${{ env.TEST_REF }})" run: | report_file="docker-lock-failure.md" { @@ -187,7 +193,7 @@ jobs: --search "$ISSUE_TITLE in:title" \ --json number,title \ --limit 100 \ - --jq '.[] | select(.title == "Nightly Docker lock-suite failure") | .number' \ + --jq ".[] | select(.title == \"$ISSUE_TITLE\") | .number" \ | head -n 1)" if [ -n "$existing_issue" ]; then diff --git a/.github/workflows/property-tests.yml b/.github/workflows/property-tests.yml index b6d313a990..9857ee22a3 100644 --- a/.github/workflows/property-tests.yml +++ b/.github/workflows/property-tests.yml @@ -1,8 +1,15 @@ name: Property Tests (nightly) -# Schedules use the default branch workflow; keep both branch copies identical. -# At #937, remap the schedules to main/v2.x and update TEST_REF/run-name. -run-name: Property Tests (${{ github.event_name == 'workflow_dispatch' && inputs.ref || (github.event.schedule == '23 22 * * *' && 'v3' || 'main') }}) +# Two branches alternate every 12 hours: main at 10:23 UTC, v3 at 22:23 UTC. +# Scheduled runs always use this file from the default branch, so the branch +# under test is chosen from the cron string that fired (as in bench.yml and +# crash-kill.yml). Each scheduled run checks out the branch head, its latest +# commit. Keep the cron strings here and in TEST_REF/run-name identical, and +# keep this file the same on main and v3. At #937, remap the schedules to +# main/v2.x. +run-name: >- + Property Tests (${{ github.event_name == 'workflow_dispatch' && inputs.ref + || (github.event.schedule == '23 22 * * *' && 'v3' || 'main') }}) on: schedule: @@ -12,8 +19,7 @@ on: workflow_dispatch: inputs: ref: - description: Branch, tag or SHA to test - type: string + description: Branch to test required: true default: main @@ -48,7 +54,14 @@ jobs: with: ref: ${{ env.TEST_REF }} - # Detect the optional suite in the checkout, including tags and candidate SHAs. + # model_based_test exists only on v3. A scheduled v3 checkout must never + # silently skip it (as in smoke.yml); elsewhere the leg is skipped. + - name: Require the v3 model-based suite + if: ${{ matrix.test == 'model_based_test' && github.event.schedule == '23 22 * * *' && hashFiles('tests/model_based_test.rs') == '' }} + run: | + echo "::error::Scheduled v3 run, but tests/model_based_test.rs is missing at $(git rev-parse HEAD)" + exit 1 + - name: Install Rust stable if: ${{ matrix.test != 'model_based_test' || hashFiles('tests/model_based_test.rs') != '' }} uses: dtolnay/rust-toolchain@stable @@ -68,13 +81,13 @@ jobs: shell: bash env: GH_TOKEN: ${{ github.token }} - ISSUE_TITLE: "Nightly property-test failure" + ISSUE_TITLE: "Nightly property-test failure (${{ env.TEST_REF }}, ${{ matrix.test }})" TEST_NAME: ${{ matrix.test }} CASES: ${{ matrix.cases }} run: | report_file="property-test-failure.md" { - echo "The nightly property-test workflow failed in \`$TEST_NAME\`." + echo "The nightly property-test workflow failed in \`$TEST_NAME\` on $TEST_REF." echo echo "- Run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" echo "- Ref: $TEST_REF" @@ -98,7 +111,7 @@ jobs: --search "$ISSUE_TITLE in:title" \ --json number,title \ --limit 100 \ - --jq '.[] | select(.title == "Nightly property-test failure") | .number' \ + --jq ".[] | select(.title == \"$ISSUE_TITLE\") | .number" \ | head -n 1)" if [ -n "$existing_issue" ]; then