From 5ccd682e2df3da27b907986c8dcbd7e804977d07 Mon Sep 17 00:00:00 2001 From: starr-openai Date: Tue, 19 May 2026 21:35:46 -0700 Subject: [PATCH] Allow targeted rust CI repros without sharding --- .github/workflows/rust-ci-full-nextest-platform.yml | 8 +++++--- .github/workflows/rust-ci-full.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust-ci-full-nextest-platform.yml b/.github/workflows/rust-ci-full-nextest-platform.yml index 21a79b9e02..45e98a0f9b 100644 --- a/.github/workflows/rust-ci-full-nextest-platform.yml +++ b/.github/workflows/rust-ci-full-nextest-platform.yml @@ -312,7 +312,7 @@ jobs: } >> "$GITHUB_STEP_SUMMARY" shard: - name: Tests shard ${{ matrix.shard }}/4 + name: Tests ${{ matrix.shard == 0 && 'all selected tests' || format('shard {0}/4', matrix.shard) }} needs: archive runs-on: ${{ inputs.runner_group != '' && fromJSON(format('{{"group":"{0}","labels":"{1}"}}', inputs.runner_group, inputs.runner_labels)) || inputs.runner }} timeout-minutes: 60 @@ -325,7 +325,7 @@ jobs: strategy: fail-fast: false matrix: - shard: ${{ inputs.selected_shard == 0 && fromJSON('[1,2,3,4]') || fromJSON(format('[{0}]', inputs.selected_shard)) }} + shard: ${{ inputs.selected_shard == 0 && fromJSON('[0]') || fromJSON(format('[{0}]', inputs.selected_shard)) }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -416,9 +416,11 @@ jobs: --no-fail-fast --archive-file "${archive_file}" --workspace-remap "${workspace_root}" - --partition "hash:${{ matrix.shard }}/4" --filterset "${NEXTEST_FILTERSET}" ) + if [[ "${{ matrix.shard }}" != "0" ]]; then + nextest_args+=(--partition "hash:${{ matrix.shard }}/4") + fi if [[ "${{ inputs.test_threads }}" != "0" ]]; then nextest_args+=(--test-threads "${{ inputs.test_threads }}") fi diff --git a/.github/workflows/rust-ci-full.yml b/.github/workflows/rust-ci-full.yml index fc7a90f313..d1291cbee3 100644 --- a/.github/workflows/rust-ci-full.yml +++ b/.github/workflows/rust-ci-full.yml @@ -24,7 +24,7 @@ on: default: all() type: string shard: - description: Full-CI shard to reproduce. Use 0 to run all four shards. + description: Full-CI shard to reproduce. Use 0 to run selected tests without sharding. required: true default: 0 type: number