ci: keep the cargo-fuzz workspace's crate patches in sync with the root - #38700
Conversation
The fuzz crates build in their own workspace, test/cargo-fuzz, which carries a copy of the root's `[patch.crates-io]` table. Its iceberg-rust entries were still pinned to the 0.9.0 fork revision after the root moved to the 0.10.1 revision in MaterializeInc#38471. A patch that no longer satisfies the version requirement is not an error to Cargo: it lands in `[[patch.unused]]` and the crate resolves from crates.io, which lacks the fork API that MaterializeInc#38475 started using, so every fuzz target reaching mz-storage-types has failed to build since 2026-08-28. The stale launchdarkly-server-sdk patch in the same table had drifted the same way. Repin the iceberg entries to the root's current revision, drop the stale one, and add a bin/lint-cargo check that fails when the fuzz workspace's patch table carries an entry the root lacks or one that differs from the root's, so the next root patch bump fails lint instead of the nightly. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
226dbd8 to
2b0e474
Compare
QA LLM Review1. MEDIUM -- New lint misses a root patch that is absent from the fuzz workspace (
|
bosconi
left a comment
There was a problem hiding this comment.
Looks good. Thank you for both putting the horses back in the stable and closing the door!
Not sure if the LLM review point about chrono-tz needs to be addressed.
A root `[patch.crates-io]` entry missing from test/cargo-fuzz/Cargo.toml makes the fuzz build use the crates.io release without any cargo warning. The chrono-tz fork had already gone missing that way. Add it, and make `bin/lint-cargo` fail on any missing root entry that is not explicitly listed as outside the fuzz dependency graph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Confirmed and fixed in 6fb3506: added the |
Motivation
The
:rust: cargo-fuzzjob has failed on every release-qualification run since 2026-08-28 (v26.40.0-rc.1) withbuild FAILED for src/transform/fuzz:mz-storage-typesfails to compile with unresolved imports ofTokenProvider,OAuth2TokenProvider,RequestAuthenticatorandBearerTokenAuthenticatorfromiceberg_catalog_rest. Every release from v26.40 to v26.44 shipped without fuzz coverage.The fuzz crates build in their own workspace,
test/cargo-fuzz, which carries a copy of the root's[patch.crates-io]table. Its three iceberg-rust entries were still pinned to the fork revision for 0.9.0 after #38471 moved the root to the 0.10.1 revision, and the root has moved the revision twice more since (#38733, #38893). A patch that no longer satisfies the version requirement is not an error to Cargo: it lands in[[patch.unused]]with a warning and the crate resolves from crates.io, which lacks the fork API that #38475 started using two seconds later. Thelaunchdarkly-server-sdkpatch in the same table had drifted the same way after the root dropped it in #37026.Description
test/cargo-fuzz/Cargo.toml: repin the three iceberg entries to the root's current revision, add the missingchrono-tzfork entry, and drop the stale LaunchDarkly patch.bin/lint-cargo(run by CI's lint step): a new check that fails when the fuzz workspace's patch table carries an entry the root does not have, one that differs from the root's, or lacks a root entry. It fails on the pre-fix manifest naming all five drifted or missing entries, and passes after. It also caught the two later root bumps: rebased onto current main before the repin, it failed naming exactly the three iceberg entries. A missing entry gets no Cargo warning at all: the root'schrono-tzfork (sql: fork chrono-tz to deliver tzdata 2026c #38735) was absent, so the fuzz targets reachingmz-pgtzbuilt against crates.io's older tzdata, and the check now fails naming it on the previous manifest. Root entries outside the fuzz dependency graph (duckdb,postgres_array) are listed in the check as omitted.Alternatives considered: per-crate fuzz workspaces (more duplication), symlinking or generating the manifest (Cargo has no include mechanism; a generated file for a table that changes a few times a year is not worth the tooling), repinning without the lint (guarantees the same outage on the next root patch bump).
Verification
cargo checkpasses forsrc/transform/fuzzand for the wholetest/cargo-fuzzworkspace (17 crates), resolving iceberg andchrono-tzfrom the forks;cargo metadatashows zero[[patch.unused]]entries.bin/lint-cargoexits 1 on the old manifest and 0 on the new one; black, ruff and pyright are clean. Not run locally: the release build with sanitizer-coverage flags andcargo fuzz builditself. The errors were unresolved imports, whichcargo checkexercises fully; the release-qualificationcargo-fuzzstep is the end-to-end check.Closes: QAR-200
🤖 Generated with Claude Code