fix(build): honor Cargo target directory when staging binaries - #3262
Merged
Conversation
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
pimlock
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
September 10, 2026 18:50
9 tasks
krishicks
approved these changes
Sep 10, 2026
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.
Summary
Stage gateway and supervisor binaries from Cargo's configured output directory. Builds using
CARGO_TARGET_DIRorbuild.target-dircan succeed while staging looks in the defaulttarget/directory and fails or copies a stale binary.Context
This is a latent local-build bug rather than a response to a CI or production failure. The default Cargo output directory is
<workspace>/target, so the hard-coded staging path works for ordinary builds. Release CI does not exercise this script; it downloads and stages prebuilt artifacts directly.The mismatch appears when a local Docker or Skaffold build uses a custom Cargo target directory:
<workspace>/targetinstead.The issue surfaced in #3074 when its content-guard smoke workflow began building the Linux supervisor image through this staging path while supporting
CARGO_TARGET_DIR. It was split into this PR because the build fix is independent of the middleware feature.Related Issue
No issue required: this is an obvious localized build-script bug fix extracted from #3074.
Changes
target_directoryfromcargo metadatain the same workspace and mise environment as the build.Testing
mise run pre-commitpasses through the commit hook.bash -n tasks/scripts/stage-prebuilt-binaries.shandgit diff --checkpass.Checklist