Skip to content

chore(deps): use the uv Dependabot ecosystem so uv.lock stays in sync - #3203

Merged
vpetersson merged 1 commit into
masterfrom
chore/dependabot-uv-ecosystem
Jul 16, 2026
Merged

chore(deps): use the uv Dependabot ecosystem so uv.lock stays in sync#3203
vpetersson merged 1 commit into
masterfrom
chore/dependabot-uv-ecosystem

Conversation

@vpetersson

Copy link
Copy Markdown
Contributor

Fixes the root cause behind the lockfile drift that #3201 had to clean up by hand.

The problem

The Python entry used package-ecosystem: "pip". The pip ecosystem reads the PEP 621 pins in pyproject.toml but has no concept of uv.lock — so every Python bump it opened updated the pin and left the lockfile resolved to the old version. All five bumps bundled in 3201 carried that drift, and it would have recurred on every future Python bump.

Dependabot can't be told to "run uv lock" — it doesn't execute arbitrary commands. The fix is the native uv ecosystem, which understands pyproject.toml and uv.lock and updates them together.

Notes on the change

  • Replaces pip rather than adding alongside it. Running both would open duplicate PRs for the same dependencies.
  • No loss of coverage. pyproject.toml + uv.lock are the only Python manifests in the repo — there is no requirements.txt, setup.py, Pipfile, or poetry.lock.
  • Groups Python updates into one PR, matching the existing bun, docker and github-actions entries. pip was the only ecosystem without a group, which is exactly why five separate PRs landed instead of one.
  • No cooldown needed. That's only recommended to mirror uv's exclude-newer, which this repo doesn't set.

On the strict == pins

Worth flagging, since there was a known issue (dependabot/dependabot-core#12788) about the uv ecosystem updating uv.lock but not pyproject.toml. It was closed as a non-bug: that reporter used >= constraints, so their manifest genuinely needed no change. This repo pins with ==, so a bump cannot satisfy the existing constraint and Dependabot must update both files.

Validation

Nothing in CI validates this file — actionlint only covers .github/workflows/, so a malformed config would fail silently rather than break a check. Verified manually instead:

  • Parses as valid YAML; all four ecosystems resolve as intended (bun, uv, docker, github-actions), each with its group.
  • Validates against the official schemastore dependabot-2.0 schema, and uv is confirmed present in that schema's package-ecosystem enum.

The real proof is the next Dependabot run opening a grouped Python PR that touches both pyproject.toml and uv.lock — worth a glance when it lands.

🤖 Generated with Claude Code

The pip ecosystem reads the PEP 621 pins in pyproject.toml but has no
concept of uv.lock, so every Python bump it opened updated the pin and
left the lockfile resolved to the old version. All five bumps bundled in
the previous change carried that drift.

Switch the Python entry to the uv ecosystem, which understands both
files and updates them together. pyproject.toml and uv.lock are the only
Python manifests in the repo (no requirements.txt / setup.py / Pipfile),
so nothing the pip ecosystem covered is lost. This replaces pip rather
than adding alongside it — running both would open duplicate PRs for the
same dependencies.

Also group Python updates into a single PR, matching the bun, docker and
github-actions entries; pip was the only ecosystem without a group, which
is why five separate PRs landed.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@vpetersson
vpetersson requested a review from a team as a code owner July 16, 2026 14:15
@vpetersson
vpetersson requested a review from Copilot July 16, 2026 14:15
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repository’s Dependabot configuration to use the native uv ecosystem so that Python dependency updates keep pyproject.toml and uv.lock in sync, preventing recurring lockfile drift.

Changes:

  • Switch Dependabot’s Python updater from pip to uv to ensure uv.lock is updated alongside pyproject.toml.
  • Add a python dependency update group for the uv ecosystem to bundle Python updates into a single PR.
  • Document in-file why uv is required (lockfile sync rationale).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vpetersson
vpetersson merged commit 61af0dd into master Jul 16, 2026
6 checks passed
@vpetersson
vpetersson deleted the chore/dependabot-uv-ecosystem branch July 16, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants