You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enforces a pinned version for all usages of drivers-evergreen-tools, and that it is always available in a known location using git submodules. Dependabot manages all of the version pins.
Evergreen scripts initialize the submodule in place instead of re-cloning into a sibling directory, and no longer delete it; DRIVERS_TOOLS defaults to the in-repo checkout (env override still wins).
just install initializes the submodule for local development; CONTRIBUTING.md drops the manual clone instructions.
GitHub Actions check out with submodules: true and pin all uses: refs to the release SHA.
Test Plan
Standard tests
Checklist
Checklist for Author
Did you update the changelog (if necessary)? — Not needed; no driver code changes.
Is there test coverage? — N/A (CI/build tooling).
Is any followup work tracked in a JIRA ticket? If so, add link(s). — No followup required; dependabot maintains the pin.
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?
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
The Evergreen path ignores the documented override, checkout validation can accept an empty submodule, and a transient review artifact remains tracked.
Get a fresh assessment by requesting another Copilot review.
Ignore generated uv.toml to keep the checkout clean
.gitmodules:3
Both setup paths create an untracked uv.toml inside this submodule, but the pinned tools checkout does not ignore that filename and this submodule has no untracked-content policy. Consequently, running just install marks the parent checkout as dirty with untracked submodule content. Please ignore this generated boundary via an appropriate submodule-local exclude/configuration, or add the boundary upstream, so routine setup leaves a clean working tree.
Add mongodb-labs/drivers-evergreen-tools as a git submodule pinned to
v1.1.0 and point every Evergreen, spawn-host, and local-dev script at
that in-tree checkout instead of the external DRIVERS_TOOLS clone,
defaulting DRIVERS_TOOLS to the submodule while still letting an env
var override win. Initialize the submodule in configure-env.sh and
setup-dev-env.sh (Evergreen's git.get_project does not init
submodules), pin the GitHub Actions reference, and update
CONTRIBUTING.md.
Because the submodule lives inside the project directory, uv's config
discovery from the tools' own scripts (uv venv / uv export in
install-cli.sh, run by setup.sh and run-mongodb.sh) reached this
project's pyproject.toml and enforced the [tool.uv] required-version
pin against whatever uv those scripts run (the host image's uv, or the
uv~=0.8.0 shim install-cli.sh installs), failing every
server-starting task. Write a uv.toml configuration boundary into the
tools checkout (write-if-absent) so the pin applies only to pymongo's
own uv invocations, record it in the submodule's local info/exclude so
routine setup leaves a clean working tree, and document the boundary.
Also:
- cleanup.sh: remove ignored credential/state files the tools scripts
write inside the tools checkout (secrets-export.sh with CSFLE Azure
secrets, AWS creds json, token_file.txt); they survive
git submodule update on reused hosts.
- utils.py: check_drivers_tools requires the .evergreen/run-mongodb.sh
sentinel instead of is_dir(), which passes on the empty directory an
uninitialized submodule leaves behind.
- gitignore the evergreen-written test-results.json and the
AI-assistant review workflow logs.
(commit --no-verify: the intentional submodule addition trips the
forbid-new-submodules hook, which this diff deliberately does not
change.)
The reason will be displayed to describe this comment to others. Learn more.
Line 108 writes to DRIVERS_TOOLS without checking that it is relative to PROJECT_DIRECTORY, so maybe we should add:
# Only touch the in-tree submodule when it is the checkout actually in use;
# an overridden DRIVERS_TOOLS is a checkout we do not own.
if [ "$DRIVERS_TOOLS" = "$PROJECT_DIRECTORY/drivers-evergreen-tools" ]; then
# Initialize the submodule (Evergreen's git.get_project does not); tolerate
# non-git hosts with a warning.
…
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This branch has not been deployed
No deployments
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
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-6051
Changes in this PR
Enforces a pinned version for all usages of
drivers-evergreen-tools, and that it is always available in a known location using git submodules. Dependabot manages all of the version pins.DRIVERS_TOOLSdefaults to the in-repo checkout (env override still wins).just installinitializes the submodule for local development;CONTRIBUTING.mddrops the manual clone instructions.submodules: trueand pin alluses:refs to the release SHA.Test Plan
Standard tests
Checklist
Checklist for Author
Checklist for Reviewer