From fe155135b6934f62a3a333f42cf37480a27d5408 Mon Sep 17 00:00:00 2001 From: Aram Grigoryan <132480+aram356@users.noreply.github.com> Date: Fri, 24 Apr 2026 10:51:30 -0700 Subject: [PATCH 1/2] Pin Viceroy install to v0.16.4 in test workflow Upstream Viceroy 0.16.6 bumped its MSRV to rustc 1.95, but this repo pins rustc 1.91.1 in rust-toolchain.toml. The test workflow installed Viceroy from HEAD, so CI picked up 0.16.6 and failed to compile with "viceroy-lib@0.16.6 requires rustc 1.95". Pin to v0.16.4, matching the tag already used by .github/actions/setup-integration-test-env/action.yml. Drop the ls-remote cache-key step since a fixed tag is now the cache key. --- .github/workflows/test.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5eea36a7..76acb342 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,20 +28,19 @@ jobs: target: wasm32-wasip1 cache-shared-key: cargo-${{ runner.os }} - - name: Get Viceroy cache key - id: viceroy-rev - run: echo "sha=$(git ls-remote https://github.com/fastly/Viceroy HEAD | cut -f1)" >> $GITHUB_OUTPUT - + # Pin Viceroy to a tag that supports the repo's rustc pin (1.91.1). + # Upstream 0.16.6 bumped MSRV to rustc 1.95, so HEAD installs break CI. + # Keep in sync with .github/actions/setup-integration-test-env/action.yml. - name: Cache Viceroy binary id: cache-viceroy uses: actions/cache@v4 with: path: ~/.cargo/bin/viceroy - key: viceroy-${{ runner.os }}-${{ steps.viceroy-rev.outputs.sha }} + key: viceroy-${{ runner.os }}-v0.16.4 - - name: Install Viceroy (from main since 0.14.3 is broken) + - name: Install Viceroy if: steps.cache-viceroy.outputs.cache-hit != 'true' - run: cargo install --git https://github.com/fastly/Viceroy viceroy + run: cargo install --git https://github.com/fastly/Viceroy --tag v0.16.4 viceroy - name: Run tests run: cargo test --workspace From 517deec63918ed029c848b5c4e2f990f10bdc98c Mon Sep 17 00:00:00 2001 From: Aram Grigoryan <132480+aram356@users.noreply.github.com> Date: Fri, 24 Apr 2026 10:55:53 -0700 Subject: [PATCH 2/2] Read Viceroy version from .tool-versions in CI Adds `viceroy 0.16.4` to `.tool-versions` and rewires both the `Run Tests` workflow and the `setup-integration-test-env` composite action to read the tag from there via grep. `.tool-versions` is now the single source of truth, so the two workflows can no longer drift on the pin. The pin is still required because upstream Viceroy > v0.16.4 bumped MSRV beyond the rustc pin in rust-toolchain.toml. --- .../setup-integration-test-env/action.yml | 13 +++++++++++-- .github/workflows/test.yml | 16 +++++++++++----- .tool-versions | 1 + 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-integration-test-env/action.yml b/.github/actions/setup-integration-test-env/action.yml index e61d129b..87c59d2f 100644 --- a/.github/actions/setup-integration-test-env/action.yml +++ b/.github/actions/setup-integration-test-env/action.yml @@ -45,6 +45,15 @@ runs: shell: bash run: echo "node-version=$(grep '^nodejs ' .tool-versions | awk '{print $2}')" >> "$GITHUB_OUTPUT" + - name: Retrieve Viceroy version + id: viceroy-version + if: ${{ inputs.install-viceroy == 'true' }} + shell: bash + # `.tool-versions` is the single source of truth for the Viceroy pin. + # The pin matters because upstream Viceroy > v0.16.4 has bumped MSRV + # beyond the rustc pin in `rust-toolchain.toml`. + run: echo "viceroy-version=$(grep '^viceroy ' .tool-versions | awk '{print $2}')" >> "$GITHUB_OUTPUT" + - name: Set up Rust toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 with: @@ -58,12 +67,12 @@ runs: uses: actions/cache@v4 with: path: ~/.cargo/bin/viceroy - key: viceroy-${{ runner.os }}-v0.16.4 + key: viceroy-${{ runner.os }}-v${{ steps.viceroy-version.outputs.viceroy-version }} - name: Install Viceroy if: ${{ inputs.install-viceroy == 'true' && steps.cache-viceroy.outputs.cache-hit != 'true' }} shell: bash - run: cargo install --git https://github.com/fastly/Viceroy --tag v0.16.4 viceroy + run: cargo install --git https://github.com/fastly/Viceroy --tag v${{ steps.viceroy-version.outputs.viceroy-version }} viceroy - name: Build WASM binary if: ${{ inputs.build-wasm == 'true' }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76acb342..186569da 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,15 @@ jobs: run: echo "rust-version=$(grep '^rust ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT shell: bash + - name: Retrieve Viceroy version + id: viceroy-version + # `.tool-versions` is the single source of truth so this workflow and + # `.github/actions/setup-integration-test-env/action.yml` can't drift. + # The pin matters because upstream Viceroy > v0.16.4 has bumped MSRV + # beyond the rustc pin in `rust-toolchain.toml`. + run: echo "viceroy-version=$(grep '^viceroy ' .tool-versions | awk '{print $2}')" >> $GITHUB_OUTPUT + shell: bash + - name: Set up Rust toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 with: @@ -28,19 +37,16 @@ jobs: target: wasm32-wasip1 cache-shared-key: cargo-${{ runner.os }} - # Pin Viceroy to a tag that supports the repo's rustc pin (1.91.1). - # Upstream 0.16.6 bumped MSRV to rustc 1.95, so HEAD installs break CI. - # Keep in sync with .github/actions/setup-integration-test-env/action.yml. - name: Cache Viceroy binary id: cache-viceroy uses: actions/cache@v4 with: path: ~/.cargo/bin/viceroy - key: viceroy-${{ runner.os }}-v0.16.4 + key: viceroy-${{ runner.os }}-v${{ steps.viceroy-version.outputs.viceroy-version }} - name: Install Viceroy if: steps.cache-viceroy.outputs.cache-hit != 'true' - run: cargo install --git https://github.com/fastly/Viceroy --tag v0.16.4 viceroy + run: cargo install --git https://github.com/fastly/Viceroy --tag v${{ steps.viceroy-version.outputs.viceroy-version }} viceroy - name: Run tests run: cargo test --workspace diff --git a/.tool-versions b/.tool-versions index 0828da5b..8d8751b8 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,4 @@ fastly 13.3.0 rust 1.91.1 nodejs 24.12.0 +viceroy 0.16.4