DRIVERS-3597 Fix over-strict update assertion and missing initialData in OpenTelemetry spec tests - #1971
Draft
blink1073 wants to merge 1 commit into
Draft
DRIVERS-3597 Fix over-strict update assertion and missing initialData in OpenTelemetry spec tests#1971blink1073 wants to merge 1 commit into
blink1073 wants to merge 1 commit into
Conversation
… in OpenTelemetry spec tests Allow the update statement assertion to accept multi and upsert at their default values, matching how the CRUD spec's own tests are written. Add initialData to the operation fixtures that create or modify collections so the runner cleans up beforehand and each fixture is repeatable within a single process.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates OpenTelemetry operation test fixtures to be more portable across drivers by relaxing an over-strict update command assertion and making operation fixtures repeatable via initialData setup.
Changes:
- Relaxed the
updatecommand expectation to allowmulti/upsertto be omitted or present with defaultfalse. - Added
initialDatato operation fixtures that create/modify collections to ensure clean, repeatable runs. - Updated the OpenTelemetry spec changelog to record the test fixture changes.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| source/open-telemetry/tests/operation/update.yml | Adds initialData and relaxes the updates assertion to accept optional multi/upsert. |
| source/open-telemetry/tests/operation/update.json | Regenerated JSON reflecting the updated update.yml fixture. |
| source/open-telemetry/tests/operation/find_and_modify.yml | Adds initialData for repeatability. |
| source/open-telemetry/tests/operation/find_and_modify.json | Regenerated JSON reflecting the updated find_and_modify.yml fixture. |
| source/open-telemetry/tests/operation/drop_indexes.yml | Adds initialData for repeatability. |
| source/open-telemetry/tests/operation/drop_indexes.json | Regenerated JSON reflecting the updated drop_indexes.yml fixture. |
| source/open-telemetry/tests/operation/drop_collection.yml | Adds initialData for repeatability. |
| source/open-telemetry/tests/operation/drop_collection.json | Regenerated JSON reflecting the updated drop_collection.yml fixture. |
| source/open-telemetry/tests/operation/delete.yml | Adds initialData for repeatability. |
| source/open-telemetry/tests/operation/delete.json | Regenerated JSON reflecting the updated delete.yml fixture. |
| source/open-telemetry/tests/operation/create_indexes.yml | Adds initialData for repeatability. |
| source/open-telemetry/tests/operation/create_indexes.json | Regenerated JSON reflecting the updated create_indexes.yml fixture. |
| source/open-telemetry/tests/operation/create_collection.yml | Adds initialData and includes an explicit dropCollection operation (with tracing expectations) to ensure repeatability. |
| source/open-telemetry/tests/operation/create_collection.json | Regenerated JSON reflecting the updated create_collection.yml fixture. |
| source/open-telemetry/tests/operation/atlas_search.yml | Adds initialData for repeatability. |
| source/open-telemetry/tests/operation/atlas_search.json | Regenerated JSON reflecting the updated atlas_search.yml fixture. |
| source/open-telemetry/tests/operation/aggregate.yml | Adds initialData for repeatability. |
| source/open-telemetry/tests/operation/aggregate.json | Regenerated JSON reflecting the updated aggregate.yml fixture. |
| source/open-telemetry/open-telemetry.md | Adds a changelog entry describing the fixture updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
DRIVERS-3597
Two problems in the OpenTelemetry operation fixtures forced drivers to carry local patches or skips instead of running the shared tests as written. Both are test-only.
updateassertion required the update statement to contain exactly a query and an update document, so drivers that also sendmultiandupsertat their default values failed it. It now accepts either shape, as the CRUD spec's own tests do.list_collectionsandlist_databasesare unchanged, since neither creates or modifies a collection.Python implementation: mongodb/mongo-python-driver#2964
PyMongo currently skips the
updatetest and adds its own cleanup to work around these two problems. PYTHON-5979 removes both workarounds once this merges.Please complete the following before merging:
clusters).
The full Evergreen matrix is still running on the PyMongo PR; I will confirm it before merge.