Skip to content

How should common_constraints changes reach uv-based repos? #578

Open

Description

@UsamaSadiq

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) curl common_constraints.txt from edx-lint master, so a merged constraint applies on the next make 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. A chore: constraint change merges but never ships.

What happened

During the mysqlclient 2.3.1 regression (openedx/edx-lint#590):

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.txt unless its title is fix: or feat: (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 upgrade needs 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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions