Repository navigation
fix(dstackup): build installed binaries with --locked - #1393
Merged
Merged
Conversation
kvinwang
added a commit
that referenced
this pull request
Sep 25, 2026
#1393 added --locked to the install.sh build. The stub cargo in tc-vmm-install-007 now records its arguments, and every row that builds must pass --locked. Signed-off-by: Kevin Wang <wy721@qq.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.
Problem
scripts/install.shbuildsdstackupwithcargo build --release -p dstackup, anddstackup installbuilds the manageddstack,dstack-vmm,dstack-authandsupervisorbinaries withcargo build --release -p .... Neither passes--locked. The results are installed into root-ownedbin/libexecand run as root (sudo dstackup install, the generated systemd units).Without
--locked, Cargo is free to re-resolve the dependency graph whenever the manifests and the checked-inCargo.lockdisagree (a stale lockfile on the selected ref, a local edit in a--sourcecheckout). The binaries then no longer correspond to the reviewed lockfile, and nothing reports it. The release pipeline (mkosi-build.yml) and the local key-provider build already use--locked. These two host install paths were the exceptions.Fix
Pass
--lockedin both places. If the lockfile would need changing, the install stops with Cargo'sthe lock file ... needs to be updated but --locked was passederror, where before it silently resolved new versions.This does not attempt to pin the source revision itself.
DSTACK_REF/--refandDSTACK_REPO/--repostay operator-chosen, as before.Verification
cargo metadata --locked --format-version 1onorigin/next: lockfile is in sync, so default installs are unaffected.cargo build --release --locked -p dstackup: builds.cargo clippy --locked -p dstackup -- -D warnings -D clippy::unwrap_used -D clippy::expect_used: clean.cargo test --locked -p dstackup: 31 passed.cargo fmt --all --check,sh -n scripts/install.sh,shellcheck scripts/install.sh: clean.