Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 30 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ permissions:

env:
CARGO_TERM_COLOR: always
# setup-rust-toolchain v2 no longer sets this; its replacement,
# CARGO_BUILD_WARNINGS=deny, needs cargo 1.97+ and we pin 1.96.0
# (rust-toolchain.toml). Once the toolchain reaches 1.97, replace this with
# `CARGO_BUILD_WARNINGS: deny` instead (set at workflow level so it reaches
# jobs that don't use setup-rust-toolchain too).
RUSTFLAGS: -D warnings

# Every job sets `timeout-minutes`. GitHub's default is 360, so a step that hangs
# rather than fails — an `apt-get` against an unresponsive mirror, a network call
Expand Down Expand Up @@ -385,7 +391,7 @@ jobs:
disable
fi

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actions-rust-lang/setup-rust-toolchain v2.0.0 changes its defaults in a way that silently weakens this repo's warning-as-errors gate.

v1.17.0's default rustflags input is "-D warnings", applied globally via RUSTFLAGS so every cargo build/cargo build --release/cargo nextest run in these workflows fails on any compiler warning, not just the ones under explicit cargo clippy -- -D warnings steps.

v2.0.0 changes the rustflags default to "" and instead defaults build-warnings to "deny" (sets CARGO_BUILD_WARNINGS=deny). Per this PR's own bundled release notes, that mechanism "is a new variable supported by cargo 1.97+" (build.warnings, stabilized in Rust 1.97.0). This repo's rust-toolchain.toml pins channel = "1.96.0", and neither the workflows nor .cargo/config.toml set RUSTFLAGS/build.warnings explicitly anywhere else.

Net effect after merging as-is: on cargo 1.96, CARGO_BUILD_WARNINGS=deny has no effect, so the previous global "-D warnings" safety net disappears for every bare cargo build/cargo build --release/cargo nextest run/cargo test step across ci.yml, nightly.yml, release.yml, e2e-selfhosted.yml, demo-gifs.yml, and dependabot-manifests.yml (the cargo clippy ... -- -D warnings steps stay protected since they pass the flag explicitly). New warnings introduced in code paths clippy doesn't cover (the PR's own Windows-clippy-gap comment nearby notes such gaps exist) would compile silently instead of failing CI.

Fix: either bump rust-toolchain.toml's channel to 1.97+ so build-warnings: deny actually takes effect, or pass rustflags: "-D warnings" explicitly to each setup-rust-toolchain step to preserve the old behavior until the toolchain is bumped.

if: needs.changes.outputs.heavy == 'true'

# Build the runtime binaries the smoke + acceptance steps below need (every
Expand Down Expand Up @@ -499,7 +505,7 @@ jobs:
if: needs.changes.outputs.rust == 'true'
run: sudo apt-get update && sudo apt-get install -y pkg-config libcap-dev

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
if: needs.changes.outputs.rust == 'true'
with:
# Keep the PR (subset) and push/merge (`--workspace`) builds in separate
Expand All @@ -510,7 +516,7 @@ jobs:

- name: Install cargo-nextest
if: needs.changes.outputs.rust == 'true'
uses: taiki-e/install-action@fcf5432d9f50d67e37ee6e29bdb7a224ff67b4a7 # v2.86.8
uses: taiki-e/install-action@8cca0918f8471c33515202b73f56ab27f2bed283 # v2.87.29
with:
tool: nextest

Expand Down Expand Up @@ -668,7 +674,7 @@ jobs:
}
exit 0

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
if: needs.changes.outputs.heavy == 'true'
with:
cache-on-failure: true
Expand Down Expand Up @@ -846,7 +852,7 @@ jobs:
if: >-
needs.changes.outputs.heavy == 'true' &&
(github.event_name == 'pull_request' || github.event.inputs.build_binaries == 'true')
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: rocm-cli-pr-windows-amd64
path: |
Expand Down Expand Up @@ -890,7 +896,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0

- name: Cache Cargo home and build artifacts
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Expand Down Expand Up @@ -952,7 +958,7 @@ jobs:
Unsigned build for manual testing only — not for production use.
EOF

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: rocm-cli-pr-linux-amd64
path: |
Expand Down Expand Up @@ -982,18 +988,19 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

# cargo-fmt hook needs rustfmt (no build).
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
with:
components: rustfmt
cache: false

# Supply-chain hardening: the action is pinned to a commit SHA and prek to
# an exact version. The action ships a hardcoded SHA-256 checksum map
# (src/known-checksums.ts) and verifies the downloaded prek archive against
# it, so a tampered release can't be installed. This commit is past the
# v2.0.4 tag because it is the one that added prek 0.4.5 to that map — pin
# an earlier commit and the action would not know 0.4.5 and skip the check.
- uses: j178/prek-action@4e14d07f9231acabce116ccfca13b13dd9755ece # prek 0.4.5 checksums
# it, so a tampered release can't be installed. The pin must resolve to a
# commit whose checksum map already has an entry for the prek version below
# — an earlier commit lacking that entry would make the action skip the
# check instead of failing closed.
- uses: j178/prek-action@44924fe9ef4a6f88253c4b6b1bf11c689d3ce53d # v3.1.0
with:
prek-version: 0.4.5
extra-args: --all-files --no-group local-tools
Expand Down Expand Up @@ -1036,7 +1043,7 @@ jobs:
# other cargo job in this workflow uses. Without it this lane builds the
# whole workspace cold against a different compiler from the rest of CI,
# inside a 30-minute timeout.
- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0

# The same container, driven by the real binary this time: discover a
# target, probe it, serve, publish, reconcile status, re-publish after an
Expand Down Expand Up @@ -1123,7 +1130,7 @@ jobs:
disable
fi

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
if: needs.changes.outputs.rust == 'true'

- name: Clippy
Expand Down Expand Up @@ -1169,7 +1176,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
if: needs.changes.outputs.tpn == 'true'

# Pin the cargo-about version so the check compares against the exact same
Expand Down Expand Up @@ -1223,7 +1230,7 @@ jobs:

- name: Install cargo-llvm-cov
if: needs.changes.outputs.rust == 'true'
uses: taiki-e/install-action@fcf5432d9f50d67e37ee6e29bdb7a224ff67b4a7 # v2.86.8
uses: taiki-e/install-action@8cca0918f8471c33515202b73f56ab27f2bed283 # v2.87.29
with:
tool: cargo-llvm-cov

Expand Down Expand Up @@ -1266,7 +1273,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
if: needs.changes.outputs.lint == 'true'

- name: Install PSScriptAnalyzer (PowerShell 7)
Expand Down Expand Up @@ -1492,7 +1499,7 @@ jobs:
# and are GitHub "Verified" (web-flow signed).
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.event.merge_group.head_sha }}

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0

- name: Verify commits are signed and signed-off
# `--require-verified` shells out to the `gh` CLI; pass the job token so
Expand Down Expand Up @@ -1565,7 +1572,7 @@ jobs:
if: steps.gate.outputs.run == 'true'
run: sudo apt-get update && sudo apt-get install -y pkg-config libcap-dev

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
if: steps.gate.outputs.run == 'true'

# The workspace test job selects only affected crates and runs the cucumber
Expand All @@ -1589,7 +1596,7 @@ jobs:

- name: Upload E2E report
if: always() && steps.gate.outputs.run == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: e2e-report
path: tests/e2e-cucumber/results/
Expand Down Expand Up @@ -1621,7 +1628,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0

# Pull every e2e artifact matching the glob. `xtask e2e-report` turns each
# into one labeled platform and the `*-report` glob makes new platforms
Expand All @@ -1633,7 +1640,7 @@ jobs:
# layout is the norm here; `discover()` handles both (labeling the root
# file from platform.json's slug).
- name: Download all E2E reports
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
pattern: '*-report'
path: e2e-artifacts
Expand All @@ -1647,7 +1654,7 @@ jobs:

- name: Upload consolidated report
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: e2e-consolidated-report
path: consolidated/
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
- uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
with:
languages: ${{ matrix.language }}

- uses: github/codeql-action/autobuild@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
- uses: github/codeql-action/autobuild@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0

- uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
- uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
10 changes: 9 additions & 1 deletion .github/workflows/demo-gifs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ concurrency:
group: demo-gifs
cancel-in-progress: true

env:
# setup-rust-toolchain v2 no longer sets this; its replacement,
# CARGO_BUILD_WARNINGS=deny, needs cargo 1.97+ and we pin 1.96.0
# (rust-toolchain.toml). Once the toolchain reaches 1.97, replace this with
# `CARGO_BUILD_WARNINGS: deny` instead (set at workflow level so it reaches
# jobs that don't use setup-rust-toolchain too).
RUSTFLAGS: -D warnings

jobs:
render:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0

# VHS + its runtime deps. ttyd/ffmpeg from apt; vhs pinned via `go install`
# (Go is preinstalled on the runner). Chrome (used by VHS to rasterize
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/dependabot-manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ concurrency:

env:
CARGO_TERM_COLOR: always
# setup-rust-toolchain v2 no longer sets this; its replacement,
# CARGO_BUILD_WARNINGS=deny, needs cargo 1.97+ and we pin 1.96.0
# (rust-toolchain.toml). Once the toolchain reaches 1.97, replace this with
# `CARGO_BUILD_WARNINGS: deny` instead (set at workflow level so it reaches
# jobs that don't use setup-rust-toolchain too).
RUSTFLAGS: -D warnings

jobs:
# Runs the generators, and therefore compiles the bumped dependency graph:
Expand All @@ -60,7 +66,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0

# Same version and cache key as ci.yml's third-party-notices job: the
# notices must be byte-identical to what that job's `--check` regenerates,
Expand Down Expand Up @@ -91,7 +97,7 @@ jobs:

- name: Upload regenerated manifests
if: steps.regen.outputs.changed == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: regenerated-manifests
path: |
Expand Down
Loading
Loading