Ignore environment-specific uv locks - #255
Open
scotttrinh wants to merge 2 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
fantix
approved these changes
Aug 6, 2026
fantix
approved these changes
Aug 6, 2026
elprans
requested changes
Aug 10, 2026
elprans
left a comment
Collaborator
There was a problem hiding this comment.
Let's hold off with merging this. Re-generating uv.lock defeats all the benefits of having said lock. I think we can fix this by making uv lock (and uv add) reference upstream PyPI directly instead.
Collaborator
Author
Doesn't that defeat the purpose of our proxy then? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue we are resolving is that local development is required to use the company-mandated proxy PyPI registry, but that registry and the resolution it produces do not translate to contributors or CI environments outside of our local machines. A checked-in
uv.locktherefore captures one machine's registry-specific view of the dependency graph and makes it repository state for everyone else. This change keeps the lockfile as a useful local artifact while stopping it from being committed.uvremains the resolver. On a fresh checkout, contributors runuv syncoruv lockto generate the local lockfile, and the documentation now explains that the file is environment- and registry-specific. The normal CI workflow no longer passes--lockedto its initialuv sync, so each runner can generate its own lockfile before running locked tools. The latest-dependencies workflow continues to use--upgrade. The news-fragment workflow explicitly bootstraps withuv lockand then runs its existing locked check.scripts/workspace.pystill uses locked workspace metadata by default, but now tells callers to create the local lockfile first. Release and build tooling continue to use the generated lockfile: workspace ordering and package metadata are resolved throughuv, and bundle vendoring still reads the generated lockfile to obtain the exact versions it must vendor.One local build hiccup was the nested vendoring path. The existing bundle builder runs
uvxto provide the vendoring tool, and that tool invokespip installinternally. The company registry does not work for pip until the local credentials are available through netrc, so the first bundle attempt returned 401 errors even though top-level uv resolution worked. After the credentials were patched into netrc, the nested pip installs, license fetches, bundle builds, and distribution verification all completed successfully. The final build produced and installed all 12 regular wheels; the bundle build also completed using the documented shared-vendor version override when the direct public PyPI metadata lookup was unavailable.The dependency audit covered the root project, all 12 workspace packages, and all 9 examples. Runtime declarations, optional extras, build requirements, workspace bounds, source imports, example references, and built wheel metadata were checked. The root development floors now include FastAPI 0.141.1, Hatchling 1.31.0, Hypothesis 6.165.0, pytest 9.1.1, pytest-asyncio 1.4.0, tox 4.58.0, tox-uv-bare 1.36.0, uvicorn 0.52.1, and zizmor 1.29.0, with the existing major-version bounds preserved and the tox requirements capped consistently. The newer zizmor version also reported the intentionally pinned workflow CLI install, so that existing step has a narrow rule suppression.
CI consistency follow-up
Following review feedback, the regular CI matrix now has one bootstrap job that runs
uv lockonce and uploads the generated file as an auditable workflow artifact. Every Python-version job depends on that job, downloads the same lockfile, and keepsuv sync --locked, so the matrix cannot drift between independent resolutions. The lockfile is downloaded before setup-uv runs, which lets setup-uv key its reusable dependency cache from that exact lockfile. The cache remains separate from the auditable artifact: it accelerates later runs without turning platform-specific downloaded packages into repository or workflow-resolution state.