ci: keep the cargo-fuzz workspace's crate patches in sync with the root - #38700
Draft
ggevay wants to merge 1 commit into
Draft
ci: keep the cargo-fuzz workspace's crate patches in sync with the root#38700ggevay wants to merge 1 commit into
ggevay wants to merge 1 commit into
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, 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The
:rust: cargo-fuzzjob has failed on every Nightly and release-qualification run since 2026-08-28 withbuild FAILED for src/transform/fuzz:mz-storage-typesfails to compile with unresolved imports ofTokenProvider,OAuth2TokenProvider,RequestAuthenticatorandBearerTokenAuthenticatorfromiceberg_catalog_rest. Fuzzing has been dark for two releases.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. 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 revision 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, or one that differs from the root's. It fails on the pre-fix manifest naming all four drifted entries, and passes after. The fuzz workspace may still omit root entries nothing in its graph needs; Cargo warns about those.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 from the fork;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 Nightlycargo-fuzzstep is the end-to-end check.🤖 Generated with Claude Code