Skip to content

PYTHON-6112 Use a stable set of tasks and and coverage in Evergreen - #3127

Merged
blink1073 merged 16 commits into
mongodb:mainfrom
blink1073:PYTHON-6112-redo
Oct 16, 2026
Merged

blink1073 merged 16 commits into
mongodb:mainfrom
blink1073:PYTHON-6112-redo

Conversation

@blink1073

@blink1073 blink1073 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

PYTHON-6112

Changes in this PR

  • Pins Evergreen PR tasks to fixed Python boundaries (min Python with min-deps, max Python and one free-threaded Python) instead of rotating them.
  • Runs every PR task with COVERAGE=1 on the newest stable version of the server, and leaves mainline batch coverage on the full rotation (every CPython across all server versions, including the latest nightly).
  • Unit tests assert the rules; the generate-config pre-commit hook regenerates the config.
  • Also fixes the AWS ECS variant's leaked pr tag.

Test Plan

  • New unit tests: pytest .evergreen/scripts/test_generate_config.py -m "".
  • Evergreen PR tests.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)? Not needed; the change affects Evergreen configuration, docs, and its test script, not the driver.
  • Is there test coverage?
  • Is any followup work tracked in a JIRA ticket? If so, add link(s). No followup work.

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

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

🟡 Changes recommended

The generated tasks still lose parts of the batch rotation and nightly coverage, and some PR-tagged tasks do not meet the stated pinning or coverage rules.

8 open findings
What changed in this PR

This PR aims to make Evergreen PR testing predictable by pinning Python and server boundaries while retaining mainline test rotation.

Changes:

  • Pins selected PR tasks to stable Python and server versions and enables coverage for them.
  • Adds generator tests and runs them before config generation.
  • Updates contributor guidance and regenerates the task configuration.
File Description
CONTRIBUTING.md Documents the intended PR task rules.
.pre-commit-config.yaml Adds test dependencies to the generation hook.
.evergreen/​scripts/​test_generate_config.py Adds checks for generated PR tasks.
.evergreen/​scripts/​generate-config.sh Runs those checks before generation.
.evergreen/​scripts/​generate_config.py Changes task selection, tags, and coverage.
.evergreen/​scripts/​generate_config_utils.py Defines Python and server boundaries.
.evergreen/​generated_configs/​tasks.yml Records the generated task changes.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .evergreen/scripts/generate_config.py Outdated
Comment thread .evergreen/scripts/generate_config.py
Comment thread .evergreen/scripts/generate_config.py
Comment thread .evergreen/scripts/generate_config.py Outdated
Comment thread .evergreen/scripts/generate_config.py
Comment thread .evergreen/scripts/generate_config.py
Comment thread .evergreen/scripts/generate_config.py Outdated
Comment thread .evergreen/scripts/test_generate_config.py

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.

Comment thread .evergreen/scripts/test_generate_config.py

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.

🔵 Needs a closer look

Three unresolved moderate findings affect task selection and duplicate execution, plus one dependency-documentation nit.

0 open findings

2 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Document pytest and pytest-asyncio test dependencies

.evergreen/​scripts/​test_generate_config.py:5

The test now requires pytest (and the hook installs pytest and pytest-asyncio), but this docstring still lists only shrub.py and pyyaml. Update the dependency list so developers following the documented standalone command know what must be installed.

🧠 Review effort: Lite

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.

🔵 Needs a closer look

Three moderate findings and one nit remain unresolved.

0 open findings

🧠 Review effort: Lite

@blink1073
blink1073 marked this pull request as ready for review October 15, 2026 20:50
@blink1073
blink1073 requested a review from a team as a code owner October 15, 2026 20:50
@blink1073
blink1073 requested a review from sleepyStick October 15, 2026 20:50
@blink1073
blink1073 merged commit c25c466 into mongodb:main Oct 16, 2026
81 checks passed
@blink1073
blink1073 deleted the PYTHON-6112-redo branch October 16, 2026 01:03
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.

3 participants