Repository navigation
Open
Description
Background
With the uv migration (#506), repos build their constraints with:
uv run --no-project --isolated --with edx-lint edx_lint write_uv_constraints pyproject.toml
write_uv_constraints (added in openedx/edx-lint#537) reads edx_lint/files/common_constraints.txt from the installed edx-lint package on PyPI. That changes how fast a global pin takes effect:
- pip-tools repos (still about 46 of them)
curlcommon_constraints.txtfrom edx-lint master, so a merged constraint applies on the nextmake upgrade. - uv repos only see a constraint after an edx-lint release reaches PyPI.
- edx-lint releases through semantic-release, so only
fix:/feat:commits publish. Achore:constraint change merges but never ships.
What happened
During the mysqlclient 2.3.1 regression (openedx/edx-lint#590):
- chore: Pin mysqlclient != 2.3.1 edx-lint#589 added
mysqlclient!=2.3.1as achore:commit. Semantic release logged "No release will be made, 6.3.0 has already been released!" - openedx-platform's "Upgrade one Python dependency" run for
mysqlclientstill resolved 2.3.1 and stopped with "No changes, so not creating PR". - fix(constraints): release mysqlclient!=2.3.1 pin edx-lint#591 (
fix:) released 6.3.1 about 2 minutes after merge, and the platform upgrade PR then went through.
Nothing failed loudly here. The pin looked merged but didn't apply to uv repos. We should decide how this is meant to work.
Option 1: constraint changes always release
Keep reading the bundled file and make sure every change to it ships:
- Add a CI check in edx-lint that fails a PR touching
edx_lint/files/common_constraints.txtunless its title isfix:orfeat:(edx-lint squash-merges, so the PR title becomes the commit subject). - Add a note to the header of
common_constraints.txt.
Pros:
- Small change, and no change to edx-lint code or to consuming repos.
- Lockfiles stay reproducible: the same edx-lint version always produces the same
constraint-dependencies. - A release takes a few minutes once triggered.
Cons:
- Every constraint change still depends on a release and a working PyPI publish.
Option 2: write_uv_constraints reads constraints from master
Fetch common_constraints.txt from edx-lint master by default, fall back to the bundled copy if the fetch fails, and allow --constraints-source bundled to opt out.
Pros:
- Matches the old pip-tools behaviour: a merged constraint applies on the next upgrade with no release.
- One release of edx-lint, then no consumer changes, since repos already run
--with edx-lint.
Cons:
- The same edx-lint version can produce different constraints over time, so lock refreshes are less reproducible.
make upgradeneeds network access to GitHub, not just PyPI.- A quiet fallback (for example, offline) could silently drop an urgent pin. Failing loudly instead would break offline lock refreshes.
Questions
- Is reproducibility of the generated constraints, or speed for urgent pins, the priority here?
- Should a constraint-only change be allowed to skip a release at all?
Metadata
Metadata
Assignees
Labels
No labels
Activity