Dockerfile: copy the shared backend crate into the image build - #220
Merged
Conversation
The image build has been broken since scene-backend landed; it only surfaced now
because the workspace-deps layer was cached until something invalidated it.
Two omissions. The cache-warm stage copied four manifests but not
crates/scene-backend/Cargo.toml — and cargo parses the WHOLE workspace before
building any of it, so a member whose manifest it cannot read is a hard error
("failed to load manifest for workspace member … failed to read
crates/scene-backend/Cargo.toml"). And no stage copied that crate's real source,
so once the manifest was there the backends would have compiled against an empty
stub lib and failed on every item they use.
The manifest and a stub lib join the warm stage; the real source lands in one
shared-build stage that all three backend stages now extend, so a change to the
shared crate rebuilds the three of them from the same layer.
Verified the failing step locally without a container: reproducing the stage's
exact copy set in a temp dir makes cargo emit that identical error, and adding the
manifest makes it parse.
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.
Create and publish Docker imageshas been failing on main since #217, with:Not caused by #217 — the Dockerfile has been wrong since
crates/scene-backendlanded in #213, and theworkspace-depslayer was simply cached until something invalidated it. Two omissions:crates/scene-backend/Cargo.toml. Cargo parses the whole workspace before building any of it, so a member whose manifest it cannot read is fatal — regardless of which packages-pnames.src. So even with the manifest present, the three backends would have compiled against the empty stub lib and failed on every item they use.The manifest and a stub lib join the warm stage; the real source lands in one
shared-buildstage that all three backend stages now extend, so a change to the shared crate rebuilds the three of them off the same layer.Verified two ways. Locally without a container: reproducing the stage's exact copy set in a temp dir reproduces that identical cargo error, and adding the manifest makes
cargo metadataparse. Then for real — this workflow ispush: [main]only, so I dispatched it on this branch: all three images (tracker, party, transcoder) built and pushed green. That run left throwaway:docker-shared-cratetags in GHCR; I'll delete them once this merges.