fix(image): honor --pip in the on-instance Dockerfile-build path (calque#196) - #197
Merged
Merged
Conversation
…que#196) Found via a real calque real --script blending_app.py --pip xarray run: the Dockerfile built successfully, then the run failed with "No module named 'xarray'" -- --pip was consumed ONLY by bootstrap.go's HostMode branch, silently dropped once a picked unit's resolved image needed an on-instance build instead (a real dependency installed via a git-cloned requirements.txt calque can't statically resolve into a .pip_install(...) layer). New image.Spec.PipPackages renders an extra RUN pip3 install layer after the resolved chain's own steps and before the worker-glue COPY lines -- threaded through realrun.go's NeedsBuild call site. The separate bare-pull path (calque#176, no Dockerfile at all) now leaks loudly instead of silently dropping --pip there too, since there's genuinely no layer to add it to in that case.
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
calque real --script blending_app.py --function inspect_netcdf_bundle --pip xarray --pip netCDF4run against real AWS: the Dockerfile built successfully, then the container run failed immediately withNo module named 'xarray'.--pipwas consumed ONLY bybootstrap.go's HostMode branch. A picked unit whose resolved image needs an on-instance Dockerfile build (calque#177'sNeedsBuildpath — e.g. a real dependency installed via a git-clonedrequirements.txt, which calque correctly can't statically resolve into a.pip_install(...)layer) silently dropped--pipentirely, with no leak, no warning.image.Spec.PipPackagesrenders an extraRUN pip3 install --no-cache-dir <packages>layer, placed after the resolved chain's own steps (so it can supplement/override anything the chain's ownpip_installalready laid down) and before the worker-glueCOPYlines. Threaded throughrealrun.go'sNeedsBuildcall site.--pipis supplied there too, since there's genuinely no Dockerfile layer to add it to in that case — better than the prior silent drop.Files touched
internal/image/dockerfile.go—Spec.PipPackages, extra layer rendering.internal/image/dockerfile_test.go— new tests (extra-layer placement, byte-for-byte-unchanged empty case).cmd/calque/realrun.go— threadso.pipPackagesthrough theNeedsBuildcall site; new leak on the bare-pull path.CHANGELOG.md.Test plan
go build ./... && go vet ./... && gofmt -l . && go test -count=1 ./...— all passgolangci-lint run ./...— 0 issuesruff check .— all checks passedTestRenderPipPackagesAddsExtraLayer/TestRenderNoPipPackagesUnchanged, using a fixture (runCommandsOnlyImage) mirroringblending_app.py's real image-chain shape that triggered this live