Skip to content

build(docker): install image dependencies from uv.lock - #65

Merged
fedorov merged 1 commit into
mainfrom
build/install-from-lock
Oct 19, 2026
Merged

fedorov merged 1 commit into
mainfrom
build/install-from-lock

Conversation

@fedorov

@fedorov fedorov commented Oct 19, 2026

Copy link
Copy Markdown
Member

Closes #57.

What

  • Dockerfile: copy uv.lock and install from it (option B from the issue): uv export --frozen --no-dev --no-emit-project → uv pip install --system -r, then uv pip install --system --no-deps .. --no-emit-project is needed because the default export includes an unhashed -e . line. uv is pinned (0.12.24) so the export is stable across builds.
  • CI: uv sync --locked. Without it, a pyproject.toml edit with a stale lock would be silently re-resolved in CI while the image installed the stale lock — CI and image would diverge again, just in the other direction.
  • idc-index==0.13.1 pin kept as the explicit statement of the served IDC release (and a guard against uv lock --upgrade moving it). Its comment and dev/deployment.md § Updating for a new IDC release now say: bump the pin, uv lock, commit both.
  • dev/developer_guide.md notes the --locked behavior.

No CHANGELOG entry — nothing user-visible changes.

Verification

  • docker build succeeds; the DuckDB bake step runs in the same system environment.
  • Installed packages in the image (uv pip list --system) match the lock export exactly — no lock-only or image-only packages besides pip/uv themselves.
  • /v3/version → {"idc_version":"v25","idc_index_data_version":"25.0.1","api_version":"3.0.0b6"}.
  • idc_api is installed as a regular (non-editable) package in site-packages.
  • uv sync --locked --extra dev passes locally.

🤖 Generated with Claude Code

The image resolved dependencies fresh from pyproject.toml's lower bounds,
so the same commit could build different images over time and the
versions CI tested and pip-audit scanned were not necessarily the ones
shipped. Export the lock to a hashed requirements file and install from
it, then install the project with --no-deps.

CI now runs `uv sync --locked`, so a lock left stale after a
pyproject.toml edit fails CI instead of being silently re-resolved —
otherwise the image (installing --frozen) would ship versions CI never
ran. uv is pinned in the image so the export is stable across builds.

The exact idc-index pin stays as the explicit statement of the served IDC
release; its comment and the deployment docs now describe the lock as
what makes rebuilds deterministic.

Closes #57

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 19, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused installation and documentation changes are consistent, with no unresolved findings.

No open issues 🎉

What changed in this PR

Aligns Docker runtime dependencies with the lockfile used by CI, addressing dependency drift described in #57.

Changes:

  • Pins uv and installs image dependencies from uv.lock.
  • Makes CI reject stale lockfiles with uv sync --locked.
  • Documents lockfile updates while retaining the exact IDC release pin.
File Description
pyproject.toml Updates comments explaining the retained IDC pin.
Dockerfile Installs locked dependencies, then the project without dependency resolution.
dev/​developer_guide.md Documents CI’s stale-lockfile check.
dev/​deployment.md Updates dependency and IDC release procedures.
.github/​workflows/​ci.yml Adds --locked to dependency installation.

Review effort: Balanced

@fedorov
fedorov merged commit ac1b080 into main Oct 19, 2026
8 checks passed
@fedorov
fedorov deleted the build/install-from-lock branch October 19, 2026 20:45
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.

Production image installs from pyproject.toml, not uv.lock

2 participants