PYTHON-5980 Commit uv.lock and automate weekly updates - #2977
Draft
blink1073 wants to merge 6 commits into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores uv.lock as a committed artifact and shifts routine Python dependency upgrades from Dependabot PRs to a scheduled GitHub Actions workflow, while adding CI enforcement to ensure the lockfile stays in sync with pyproject.toml.
Changes:
- Track
uv.lockagain (and stop ignoring it), and update pre-commit to avoid rejecting it as a large file. - Add CI enforcement via
uv lock --check, and document how to regenerate/resolve conflicts. - Limit Dependabot’s
uvecosystem updates to security-only, and introduce a weekly workflow to maintain a single lockfile-update PR; remove the legacyset-uv-exclude-neweraction.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
CONTRIBUTING.md |
Documents the new dependency/lockfile update workflow and how to regenerate/resolve uv.lock. |
.pre-commit-config.yaml |
Excludes uv.lock from the “added large files” check so it can be committed. |
.gitignore |
Stops ignoring uv.lock so it can be tracked. |
.github/workflows/uv-lock-update.yml |
Adds weekly automation to upgrade and PR uv.lock updates. |
.github/workflows/test-python.yml |
Adds a CI step to fail if uv.lock drifts from pyproject.toml. |
.github/dependabot.yml |
Disables routine uv version-update PRs while keeping security updates. |
.github/actions/set-uv-exclude-newer/action.yml |
Removes the obsolete action that set an absolute UV_EXCLUDE_NEWER cutoff. |
Comment on lines
+35
to
+38
| # TEMPORARY: pinned to an unmerged branch of a fork for end to end testing. | ||
| # Repin to mongodb-labs/drivers-github-tools/python/uv-lock-update@<sha> # v3 | ||
| # before this is merged. | ||
| - uses: blink1073/drivers-github-tools/python/uv-lock-update@7daba1126df7c2b5c2f1203feec67d2c70e9d791 |
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.
PYTHON-5980
Changes in this PR
Commits
uv.lockand moves routine dependency upgrades to a scheduled workflow, reversingd150c687(PYTHON-5862).uv.lockis tracked again, and CI fails when it drifts frompyproject.toml..github/actions/set-uv-exclude-neweris removed. Its absolute cutoff conflicts with a committed lock, andpyproject.tomlsupplies the cooldown.Requires an
automationenvironment holdingAPP_IDandAPP_PRIVATE_KEY. The workflow is pinned to a fork branch for testing and needs repinning to a merged SHA from mongodb-labs/drivers-github-tools#113.Test Plan
pyproject.toml, and deleting it and regenerating produces an identical file.uv lock --checkstep was tested in both directions: it passes on the committed lock, and it fails whenpyproject.tomlchanges without a relock.just typing,just lint, andjust lint-manualpass.Checklist
Checklist for Author
Checklist for Reviewer
AI assistance disclosure
Claude Code was used throughout: design, implementation, tests, review, and the end to end validation runs. Every change has been reviewed line by line by the author.