fix(ci+docker): install from uv.lock — stop resolving dependencies at build time #81

Merged
bvandeusen merged 4 commits from dev into main 2026-07-28 13:04:24 -04:00
Showing only changes of commit 8bab0c762b - Show all commits
+13 -5
View File
@@ -132,19 +132,27 @@ jobs:
key: uv-${{ hashFiles('uv.lock') }} key: uv-${{ hashFiles('uv.lock') }}
restore-keys: uv- restore-keys: uv-
# Installs exactly what uv.lock pins. `--locked` additionally FAILS if the # Installs exactly what uv.lock pins, and resolves nothing itself.
# lock is stale against pyproject, so a dependency change has to go through
# a deliberate `uv lock` — it can't drift in silently.
# #
# This replaced `uv pip install -e ".[dev]"`, which resolved from the # This replaced `uv pip install -e ".[dev]"`, which resolved from the
# pyproject constraints and ignored the lock entirely. Every dependency # pyproject constraints and ignored the lock entirely. Every dependency
# floated: on 2026-07-28 mcp 2.0.0 shipped mid-session and turned `main` # floated: on 2026-07-28 mcp 2.0.0 shipped mid-session and turned `main`
# red with no repo change (issue #2194). Green CI has to mean "these exact # red with no repo change (issue #2194). Green CI has to mean "these exact
# versions passed", or it isn't evidence of anything. # versions passed", or it isn't evidence of anything.
#
# `--frozen`, not `--locked`, and that difference is a known gap: --locked
# additionally fails when the lock is STALE against pyproject, which is the
# guard that would catch someone editing a dependency without re-locking.
# It can't be turned on until uv.lock is regenerated with `uv lock` — the
# mcp cap edited pyproject, so the lock no longer matches, and this
# workstation has no uv (or pip) to regenerate it with. --frozen still
# delivers the reproducibility this fix is for; a forgotten re-lock shows
# up as a loud ImportError rather than a silent version drift. Flip to
# --locked in the same change that regenerates the lock.
- name: Install locked dependencies - name: Install locked dependencies
env: env:
UV_PROJECT_ENVIRONMENT: /opt/venv UV_PROJECT_ENVIRONMENT: /opt/venv
run: uv sync --locked --extra dev run: uv sync --frozen --extra dev
- name: Run tests - name: Run tests
# Integration tests (real Postgres) run in the `integration` job below. # Integration tests (real Postgres) run in the `integration` job below.
@@ -189,7 +197,7 @@ jobs:
- name: Install locked dependencies - name: Install locked dependencies
env: env:
UV_PROJECT_ENVIRONMENT: /opt/venv UV_PROJECT_ENVIRONMENT: /opt/venv
run: uv sync --locked --extra dev run: uv sync --frozen --extra dev
- name: Integration suite (resolve service IP, migrate, test) - name: Integration suite (resolve service IP, migrate, test)
run: | run: |
set -eux set -eux