You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 22d4fc3
Browse filesBrowse the repository at this point in the historyBrowse files
fix: assemble a build context for uv path sources and pin the uv that resolves it (#56)
Two independent defects made this recipe emit an image build that resolved on
the developer's machine and failed inside the builder stage.
A `[tool.uv.sources]` path is resolved against the directory of the
pyproject.toml that declares it, and uv.lock records the same relative path. The
recipe's context was the service directory and nothing beside it, so a path
naming a sibling service was absent from the builder stage and `uv sync
--frozen` failed there with
error: Could not compute absolute path from workspace root and lockfile path
Two services sharing one Python project in a repository is a layout this recipe
has to build. It now assembles a context when, and only when, a path leaves the
project: the service's own tree and each escaping target are placed at their
repository-relative paths under one root, and the builder stage's working
directory is the project's own path under it, so every relative path resolves
there to what it resolves to on the host. Nothing in pyproject.toml or uv.lock
is rewritten. Containment is the rule: a path leaving the repository, or naming
a directory that is not there, is reported with the declaration rather than
skipped, because a silently dropped source would build the image against a
different dependency than the developer builds against.
That build claims the whole tree it assembled (RECIPE_INVENTORY_SCOPE_TREE),
which is what roots the docker context at the assembled output; a build that
only renders a Dockerfile and its ignore still claims exactly those and still
builds the service directory.
Second, the builder stage ran whichever uv the base image had been built with,
a version stated nowhere a project or this agent can read. A project written
against a newer `[tool.uv]` key was diagnosed there as an unknown field — the
base image carries uv 0.5.29, measured, and that uv rejects
build-constraint-dependencies. A recipe meant to be durable and reproducible
cannot leave its resolver implicit, and the Go recipe already states its Go and
Alpine versions outright. The builder stage now copies a pinned uv in before
anything resolves.
Co-authored-by: Antoine Toussaint <312536060+antoinetoussaint-byte@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments