Skip to content

Use uv sync --locked in Dockerfile#963

Merged
qin-ctx merged 1 commit intovolcengine:mainfrom
mtthidoteu:fix/dockerfile-locked-sync
Mar 25, 2026
Merged

Use uv sync --locked in Dockerfile#963
qin-ctx merged 1 commit intovolcengine:mainfrom
mtthidoteu:fix/dockerfile-locked-sync

Conversation

@mtthidoteu
Copy link
Copy Markdown
Contributor

Summary

Why

Without --locked, uv sync will silently re-resolve dependencies if pyproject.toml has drifted from uv.lock. In a Docker build this means a stale lockfile could cause unexpected package versions to be installed — a supply chain risk highlighted by the recent litellm incident.

With --locked, the build fails fast if the lockfile is inconsistent with pyproject.toml, ensuring Docker images are always built from the committed lockfile.

Change

-    uv sync --no-editable
+    uv sync --locked --no-editable

…resolution

Without --locked, uv sync will silently re-resolve dependencies if
pyproject.toml has drifted from the lockfile. This could pull in
unexpected package versions during Docker builds.

The --locked flag ensures the build fails fast if the lockfile is
stale, matching uv's recommended practice for production builds
(https://docs.astral.sh/uv/guides/integration/docker/).
@qin-ctx qin-ctx merged commit 2454616 into volcengine:main Mar 25, 2026
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants