From d8a6ec66f8db49fd7052d77061d7802bea6f41bc Mon Sep 17 00:00:00 2001 From: matrixarkai Date: Thu, 29 Oct 2026 19:29:01 -0700 Subject: [PATCH] Install protobuf-compiler in CI: the build script cannot find protoc cargo check / build / test -- the gating job -- has been failing on main since at least 2026-10-28, and on every pull request regardless of its diff: error: failed to run custom build command for `raft-proto v0.7.0` Could not find `protoc` installation and this build crate cannot proceed Confirmed on main's own head commit 27fd0238 (run 40886502716, the nightly of 2026-10-29), so it is not a branch problem. Neither job installed it -- the dependency step was clang, libclang-dev and cmake, and protoc came from the runner image, which no longer provides it. raft-proto's build script runs prost-build, which shells out to protoc and panics without it. What hid it is the cache. actions/cache restores target, so the DEBUG build-script output came back cached and cargo check never re-ran it, while the release build had nothing cached and had to. The job therefore failed only on the release profile, which reads like a release-only problem rather than a missing package. That also means the fast check job, the only job a push to main runs, is passing on cache luck and would fail on a cold cache -- so both jobs are fixed here, not just the one that is currently red. The package is identified by provenance rather than guessed: on a machine where the build succeeds, `which protoc` is /usr/bin/protoc and `dpkg -S /usr/bin/protoc` reports protobuf-compiler as its owner. One apt line per job plus the comment explaining it. No Rust code, no triggers, no job graph; check, build-and-test and sdk-rust are otherwise untouched, and the file still parses and still declares all three. Co-Authored-By: Claude Opus 5 --- .github/workflows/rust-ci.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 3fa191aaf..44f789884 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -54,9 +54,19 @@ jobs: - name: Install system build dependencies # librocksdb-sys (via matrixcache's rocksdb-ssd feature) runs bindgen and # needs libclang; building RocksDB itself needs cmake. + # + # protobuf-compiler is NOT optional and is NOT provided by the runner image. + # `raft-proto`'s build script runs prost-build, which shells out to `protoc` + # and panics without it. This was absent here and the gate still passed for + # months: `actions/cache` restores `target`, so the DEBUG build-script output + # came back from the cache and `cargo check` never re-ran it, while the + # release build below had nothing cached and had to. The job therefore failed + # only on the release profile, which made it look like a release-only problem + # rather than a missing package. Installing it here instead of relying on the + # image means a cold cache fails nothing. run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends clang libclang-dev cmake + sudo apt-get install -y --no-install-recommends clang libclang-dev cmake protobuf-compiler - name: Install Rust toolchain run: rustup toolchain install 1.88.0 --profile minimal --no-self-update && rustup default 1.88.0 @@ -86,9 +96,19 @@ jobs: - name: Install system build dependencies # librocksdb-sys (via matrixcache's rocksdb-ssd feature) runs bindgen and # needs libclang; building RocksDB itself needs cmake. + # + # protobuf-compiler is NOT optional and is NOT provided by the runner image. + # `raft-proto`'s build script runs prost-build, which shells out to `protoc` + # and panics without it. This was absent here and the gate still passed for + # months: `actions/cache` restores `target`, so the DEBUG build-script output + # came back from the cache and `cargo check` never re-ran it, while the + # release build below had nothing cached and had to. The job therefore failed + # only on the release profile, which made it look like a release-only problem + # rather than a missing package. Installing it here instead of relying on the + # image means a cold cache fails nothing. run: | sudo apt-get update - sudo apt-get install -y --no-install-recommends clang libclang-dev cmake + sudo apt-get install -y --no-install-recommends clang libclang-dev cmake protobuf-compiler - name: Install Rust toolchain run: rustup toolchain install 1.88.0 --profile minimal --no-self-update && rustup default 1.88.0