Skip to content

PYTHON-6293 Bump unified test runner to schema version 1.30 - #3250

Merged
blink1073 merged 3 commits into
mongodb:mainfrom
blink1073:PYTHON-6293
Nov 24, 2026
Merged

blink1073 merged 3 commits into
mongodb:mainfrom
blink1073:PYTHON-6293

Conversation

@blink1073

@blink1073 blink1073 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

PYTHON-6293

Changes in this PR

The 2026-11-23 spec resync moved two consumed spec files to schema version 1.30 while the runner supported only 1.28, so the generated tests failed the version assertion in setup.

  • Bumped the unified test runner's supported schema version to 1.30.
  • Added the $$gte matching operator, required by schema 1.29.
  • Added a unit test that flags any consumed spec file above the runner's supported version, so a future resync fails a unit test instead of a runtime assertion.

The 1.30 dsc run-on requirement is ignored like the deprecated serverless field; evaluating it is follow-up work since only "forbid" appears in current specs.

Test Plan

Reproduced the failure on a local three-node replica set. The fixed runner passes the failing test; reverting the bump re-fails the new coverage test.

  • Unified format and SDAM suites, async and sync mirrors: passed.
  • mypy --config-file mypy_test.ini test, ruff check, ruff format --check: clean.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)? (not needed; test-only change)
  • Is there test coverage?
  • Is any followup work tracked in a JIRA ticket? If so, add link(s). PYTHON-5958 for the actual dsc tests.

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?

@blink1073
blink1073 requested a balanced review from Copilot November 24, 2026 17:03
@blink1073 blink1073 changed the title PYTHON-6293 [BF] test_Rediscover_quickly_after_replSetStepDown PYTHON-6293 Bump unified test runner to schema version 1.30 Nov 24, 2026

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

Special-operator matching raises a TypeError when key_to_compare is None, breaking comparisons against whole operation results and array elements.

1 open issue
What changed in this PR

Updates the unified test runner to accept schema version 1.30, addressing setup failures after the spec resync. Evaluation of the dsc run-on requirement remains deferred.

Changes:

  • Raises the supported schema version from 1.28 to 1.30.
  • Adds the $$gte matcher and comparison tests.
  • Adds coverage to flag spec files requiring unsupported schema versions.
File Description
test/​unified_format.py Updates the synchronous runner’s supported schema version.
test/​unified_format_shared.py Adds shared $$gte matching support.
test/​test_unified_format.py Adds synchronous schema coverage and comparison tests.
test/​asynchronous/​unified_format.py Updates the asynchronous runner’s supported schema version.
test/​asynchronous/​test_unified_format.py Adds asynchronous schema coverage and comparison tests.

Review effort: Balanced

Comment thread test/unified_format_shared.py Resolved

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 $$lte and $$gte truthiness checks mishandle valid empty-string field names, causing dictionary-to-number comparisons that raise TypeError.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread test/unified_format_shared.py Resolved

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.

🟢 Approval recommended

No active review issues are recorded for the unified test runner’s schema-version and comparison-matching updates.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@blink1073
blink1073 marked this pull request as ready for review November 24, 2026 17:35
@blink1073
blink1073 requested a review from a team as a code owner November 24, 2026 17:35
@blink1073
blink1073 requested a review from kevinAlbs November 24, 2026 17:35
@blink1073
blink1073 merged commit 0134933 into mongodb:main Nov 24, 2026
68 checks passed
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