diff --git a/.github/runner-scale-sets/query-regression/README.md b/.github/runner-scale-sets/query-regression/README.md index 6e1f6d603fe..7228f29c329 100644 --- a/.github/runner-scale-sets/query-regression/README.md +++ b/.github/runner-scale-sets/query-regression/README.md @@ -158,7 +158,8 @@ overridable via `QUERY_REGRESSION_RUNNER_UID`/`QUERY_REGRESSION_RUNNER_GID`) and exact tool versions: `libprotoc 3.21.12`, `uv 0.11.26`, `mold 2.40.4`, `Python 3.14.4`, `sccache 0.16.0`, `otelgen` commit `863a3f395d062c7322cc1de08a38774b7fdaa6c8`, root-owned `rustup 1.29.0`, and -the image-baked `1.96.1` Rust toolchain. `mold` and `python3` +the image-baked Rust toolchain matching the pin resolved from +`rust-toolchain.toml` (asserted dynamically by the workflow). `mold` and `python3` come from apt at image-build time (not Ubuntu 24.04's default 3.12); bump the Verify pins together with `QUERY_REGRESSION_ECS_IMAGE_ID` when the image is rebuilt. Rustup, Cargo, and Rustc diff --git a/.github/workflows/query-regression.yml b/.github/workflows/query-regression.yml index 63475840219..8ce77827de7 100644 --- a/.github/workflows/query-regression.yml +++ b/.github/workflows/query-regression.yml @@ -120,12 +120,23 @@ jobs: # Ordinary PRs also run the same tests from checks.yml. runs-on: ubuntu-latest timeout-minutes: 10 + outputs: + # The Rust toolchain pin, resolved from rust-toolchain.toml so the + # benchmark always runs the workspace toolchain without a second + # hard-coded copy in this workflow. + rust_toolchain: ${{ steps.rust-toolchain.outputs.pin }} steps: - name: Checkout uses: actions/checkout@v4 with: persist-credentials: false + - name: Resolve Rust toolchain pin + id: rust-toolchain + run: | + pin="$(grep -E '^channel' rust-toolchain.toml | cut -d'"' -f2)" + echo "pin=${pin}" >> "$GITHUB_OUTPUT" + - name: Test query regression tooling run: | python3 tests/perf/test_query_regression_runner_compaction_toctou.py @@ -190,7 +201,7 @@ jobs: CARGO_HOME: /home/runner/.cargo UV_CACHE_DIR: /home/runner/.cargo/uv-cache RUSTUP_HOME: /opt/rustup - RUSTUP_TOOLCHAIN: 1.96.1 + RUSTUP_TOOLCHAIN: ${{ needs.test-tooling.outputs.rust_toolchain }} RUSTUP_AUTO_INSTALL: "0" CARGO_TARGET_DIR: /home/runner/query-regression-target QUERY_REGRESSION_CACHE_META: /home/runner/query-regression-cache-meta @@ -504,14 +515,16 @@ jobs: require_eq cargo_path "$(command -v cargo || true)" "/opt/cargo/bin/cargo" require_eq rustc_path "$(command -v rustc || true)" "/opt/cargo/bin/rustc" require_match rustup "$(capture rustup --version)" '^rustup[[:space:]]1\.29\.0([[:space:]]|$)' + # The toolchain pin flows from rust-toolchain.toml (resolved in the + # test-tooling job); escape it for the regex assertions below. + pin_regex="${RUSTUP_TOOLCHAIN//./\\.}" require_match cargo "$(capture cargo --version)" \ - '^cargo[[:space:]]1\.96\.1[[:space:]]\(356927216[[:space:]][0-9]{4}-[0-9]{2}-[0-9]{2}\)$' + "^cargo[[:space:]]${pin_regex}[[:space:]]\([0-9a-f]+[[:space:]][0-9]{4}-[0-9]{2}-[0-9]{2}\)$" require_match rustc "$(capture rustc --version)" \ - '^rustc[[:space:]]1\.96\.1[[:space:]]\(31fca3adb[[:space:]][0-9]{4}-[0-9]{2}-[0-9]{2}\)$' + "^rustc[[:space:]]${pin_regex}[[:space:]]\([0-9a-f]+[[:space:]][0-9]{4}-[0-9]{2}-[0-9]{2}\)$" require_match active_toolchain "$(capture rustup show active-toolchain)" \ - '^1\.96\.1-x86_64-unknown-linux-gnu([[:space:]]|$)' + "^${pin_regex}-x86_64-unknown-linux-gnu([[:space:]]|$)" require_eq RUSTUP_HOME "${RUSTUP_HOME}" "/opt/rustup" - require_eq RUSTUP_TOOLCHAIN "${RUSTUP_TOOLCHAIN}" "1.96.1" require_eq RUSTUP_AUTO_INSTALL "${RUSTUP_AUTO_INSTALL}" "0" require "readable /opt/rustup" test -r /opt/rustup require "executable /opt/rustup" test -x /opt/rustup