Make infra Dockerfile buildable: install git, drop the masked deps layer - #117
Open
aleksUIX wants to merge 1 commit into
Open
Make infra Dockerfile buildable: install git, drop the masked deps layer#117aleksUIX wants to merge 1 commit into
aleksUIX wants to merge 1 commit into
Conversation
Three defects kept infra/docker/Dockerfile from building since the iab-agentic-primitives git dependency landed: 1. Neither stage installs git, so pip aborts with "Cannot find command 'git'" at the first install (the Docker Build CI job fails exactly there). git is now installed in the builder. 2. The "cache-friendly" layer ran pip install -e . with only pyproject.toml copied and masked the outcome with 2>/dev/null; true. An editable hatchling build cannot succeed without the source tree, so the layer installed nothing and silently hid every failure. The layer is removed; one honest install runs after COPY. 3. The runtime stage re-ran a full pip install -e ., re-resolving all dependencies (and needing git again) even though the builder venv is copied wholesale. It now uses --no-deps to just re-point the editable install at /app. Building still requires access to the private iab-agentic-primitives repo; that remaining blocker is tracked separately.
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
infra/docker/Dockerfilecannot build since theiab-agentic-primitivesgit dependency landed. Three separate defects:gcc, the runtime onlycurl, sopip install -e .aborts withCannot find command 'git'. This is exactly where the Docker Build job fails in CI (e.g. run 29931710287).pip install -e . 2>/dev/null; truewith onlypyproject.tomlcopied. An editable hatchling build needs the source tree (packages = ["src/ad_buyer"]), so the layer installs nothing, and the redirect-plus-truehides that outcome. Every source change re-resolves all dependencies in the later layer anyway, so the layer bought no caching, only masked failures.pip install -e .even though the builder venv is copied wholesale, which would also require git (and repo access) inside the runtime image.Change
gitin the builder stage, with a comment saying why.pip install -e .runs afterCOPY . ..pip install --no-cache-dir --no-deps -e .to re-point the editable install at/app; dependencies already live in the copied venv, and the runtime image no longer needs git.Scope note
With this change the build proceeds past the git-missing error, but a public clone still cannot complete it: pip then fails cloning the private
iab-agentic-primitivesrepo, the same blocker that has CI on main red. That access problem is maintainer-side and tracked separately; this PR fixes what is fixable in the Dockerfile itself. Verification is static plus the CI logs above, since the terminal step needs repo access either way.