Skip to content

PYTHON-5862 Cleanup lockless uv usage - #2966

Open
NoahStapp wants to merge 3 commits into
mongodb:mainfrom
NoahStapp:PYTHON-5862-2
Open

PYTHON-5862 Cleanup lockless uv usage#2966
NoahStapp wants to merge 3 commits into
mongodb:mainfrom
NoahStapp:PYTHON-5862-2

Conversation

@NoahStapp

@NoahStapp NoahStapp commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

PYTHON-5862

Changes in this PR

Removes the no-op UV_NO_LOCK environment variable usage (it doesn't exist anywhere in uv's docs, pure hallucination) in our CI alongside several other confusing and non-functional changes introduced by #2902. Also fixes the persistent failure of test-auth-aws-ecs due to the lockfile removal.

Test Plan

Test infra changes.

Checklist

Checklist for Author

  • [ ] Did you update the changelog (if necessary)?
  • [ ] Is there test coverage?
  • [ ] Is any followup work tracked in a JIRA ticket? If so, add link(s).

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@blink1073
blink1073 self-requested a review July 29, 2026 18:00
@NoahStapp

Copy link
Copy Markdown
Contributor Author

Test failures will be resolved by PYTHON-5974.

@NoahStapp
NoahStapp marked this pull request as ready for review July 29, 2026 20:03
@NoahStapp
NoahStapp requested a review from a team as a code owner July 29, 2026 20:03
Copilot AI review requested due to automatic review settings July 29, 2026 20:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR cleans up CI and Evergreen test infrastructure by removing the previously-added UV_NO_LOCK environment variable usage (which is not a real uv setting), and adjusts the AWS ECS test harness to avoid failures stemming from lockfile behavior.

Changes:

  • Remove UV_NO_LOCK exports/usages from just, GitHub Actions, and Evergreen scripts.
  • Simplify [tool.uv] configuration by dropping default-groups (the dev group is empty).
  • Fix AWS ECS test environment setup by installing git (needed to resolve the mockupdb git dependency) and removing any pre-existing uv.lock inside the container.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Removes uv default-groups config while keeping exclude-newer behavior.
justfile Drops UV_NO_LOCK export from just execution environment.
.github/workflows/test-python.yml Removes UV_NO_LOCK from workflow environment.
.evergreen/scripts/setup-tests.sh Removes UV_NO_LOCK export before running uv.
.evergreen/scripts/kms_tester.py Removes UV_NO_LOCK from KMS remote command strings.
.evergreen/scripts/configure-env.sh Removes UV_NO_LOCK from exported Evergreen environment.
.evergreen/run-tests.sh Removes UV_NO_LOCK export before running tests.
.evergreen/run-mongodb-aws-ecs-test.sh Installs git and removes uv.lock to address ECS test failures.

Comment thread .evergreen/run-mongodb-aws-ecs-test.sh Outdated
@blink1073

Copy link
Copy Markdown
Member

So in general we're still creating lock files, but they're git ignored? If so we may want to reconsider because our local dev with almost never be the same as CI.

@NoahStapp

Copy link
Copy Markdown
Contributor Author

So in general we're still creating lock files, but they're git ignored? If so we may want to reconsider because our local dev with almost never be the same as CI.

There isn't currently a way to prevent invocations of uv run, uv sync, and the like from creating a lockfile. Multiple invocations of uv on one machine will lead to a lockfile being used by the latter runs. That seems fine to me, especially if we decide to have our CI scripts cleanup uv.lock files as part of setup/teardown.

@blink1073

Copy link
Copy Markdown
Member

What I mean is, we might be better off following astral's advice and checking in the lock file, and then having a job that periodically updates the lock file. This would mean going back to using "pip" in the dependabot config to avoid the spurious update PRs.

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.

4 participants