Repository navigation
ci(release): bump the Rust fuzz workspace's lockfile with the crates - #410
Merged
Merged
Conversation
runtimes/rust/fuzz is its own workspace with its own Cargo.lock, which pins its path dependency on nino-serialization. bump_version.py only set the version in runtimes/rust/Cargo.lock, so the fuzz lockfile stayed at rc.7, where it was added, through the rc.8, rc.9 and rc.10 releases, and every fuzz build rewrote the tracked file. bump_version.py now sets the version there too, and the lockfile is brought up to rc.10 (the one line cargo changes). Closes JasonXuDeveloper#397
Owner
|
Thanks for tracking this down and for the clear write-up! I checked it locally: running |
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.
Closes #397
I started from #397 and checked it against the code.
runtimes/rust/fuzzis its own workspace, and itsCargo.lockpins the path dependencynino-serializationat4.0.0-rc.7, the version it had when the fuzz workspace was added..github/scripts/bump_version.pysets the version inruntimes/rust/Cargo.lockbut not in this file, so it stayed at rc.7 through the rc.8, rc.9 and rc.10 releases.This change:
bump_version.pyalso sets thenino-serializationversion inruntimes/rust/fuzz/Cargo.lock, with the samesub()call as the main lockfile, so a release fails if the entry is missing. The path is printed with the others, sorelease.ymladds it to the release commit.runtimes/rust/fuzz/Cargo.lockis brought up to rc.10. That is the one line cargo itself changes there (cargo metadatain the fuzz workspace without--locked).How I found it
I compared the
nino-serializationentries in the two lockfiles withruntimes/rust/Cargo.toml, then readbump_version.pyand the "Commit and tag" step ofrelease.ymlto see which files a release writes.Where this can show up in practice
Anyone who runs the Rust fuzzers from a checkout of
main(cargo +nightly fuzz run, asruntimes/rust/README.mdandfuzz/Cargo.tomldescribe) gets a modifiedCargo.lockin their working tree, and a build with--lockedin that workspace fails. This is my estimate beyond the report in #397.Testing
main,cargo metadata --lockedinruntimes/rust/fuzzfails withcannot update the lock file ... because --locked was passed. With this change it passes, andcargo check --locked --binsthere builds without touching the lockfile (Rust 1.96.0, macOS arm64).python3 .github/scripts/bump_version.py 4.0.0-rc.11 4.0.0-rc.11exits 0, listsruntimes/rust/fuzz/Cargo.lockamong the written files, and afterwardscargo metadata --lockedpasses in bothruntimes/rustandruntimes/rust/fuzz.cargo +nightly fuzz run, and the release workflow itself.