Skip to content

Make infra Dockerfile buildable: install git, drop the masked deps layer - #117

Open
aleksUIX wants to merge 1 commit into
IABTechLab:mainfrom
aleksUIX:fix/dockerfile-buildable
Open

Make infra Dockerfile buildable: install git, drop the masked deps layer#117
aleksUIX wants to merge 1 commit into
IABTechLab:mainfrom
aleksUIX:fix/dockerfile-buildable

Conversation

@aleksUIX

Copy link
Copy Markdown
Contributor

Problem

infra/docker/Dockerfile cannot build since the iab-agentic-primitives git dependency landed. Three separate defects:

  1. No git in either stage. The builder installs only gcc, the runtime only curl, so pip install -e . aborts with Cannot find command 'git'. This is exactly where the Docker Build job fails in CI (e.g. run 29931710287).
  2. A silently no-op dependency layer. The "cache-friendly" step runs pip install -e . 2>/dev/null; true with only pyproject.toml copied. An editable hatchling build needs the source tree (packages = ["src/ad_buyer"]), so the layer installs nothing, and the redirect-plus-true hides that outcome. Every source change re-resolves all dependencies in the later layer anyway, so the layer bought no caching, only masked failures.
  3. The runtime stage re-resolves everything. It runs a full pip install -e . even though the builder venv is copied wholesale, which would also require git (and repo access) inside the runtime image.

Change

  • Install git in the builder stage, with a comment saying why.
  • Remove the masked layer; a single honest pip install -e . runs after COPY . ..
  • Runtime uses 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-primitives repo, 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant