[DRIVERS-2294] Add createCollection and collMod spec tests for changeStreamPreAndPostImages option Created: 26/Apr/22  Updated: 25/Sep/23  Resolved: 25/Sep/23

Status: Closed
Project: Drivers
Component/s: Collection Management
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Benji Rewis (Inactive)
Resolution: Done Votes: 0
Labels: yaml-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to JAVA-4592 Support change stream pre- and post- ... Closed
split to GODRIVER-2396 Add createCollection and collMod spec... Closed
split to PHPLIB-856 Add createCollection and collMod spec... Closed
split to CDRIVER-4368 Add createCollection and collMod spec... Closed
split to CSHARP-4152 Add createCollection and collMod spec... Closed
split to CXX-2499 Add createCollection and collMod spec... Closed
split to MOTOR-948 Add createCollection and collMod spec... Closed
split to NODE-4210 Add createCollection and collMod spec... Closed
split to PYTHON-3239 Add createCollection and collMod spec... Closed
split to RUBY-2971 Add createCollection and collMod spec... Closed
split to RUST-1295 Add createCollection and collMod spec... Closed
Related
is related to DRIVERS-1915 Change streams support for user-facin... Closed
Driver Changes: Needed
Downstream Changes Summary:

Drivers should sync their collection management spec tests to this commit. Drivers with createCollection and modifyCollection helpers should add a changeStreamPreAndPostImages option that is a document passed in the create or collMod command respectively.
Update: serverless: forbid was added in this commit

Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4368 Fixed 1.22.0, 1.22.0-beta0
CXX-2499 Fixed 3.7.0
CSHARP-4152 Done 2.16.0
GODRIVER-2396 Done 1.10.0, 1.10.0-beta1
JAVA-4592 Fixed 4.7.0
NODE-4210 Done 4.7.0
MOTOR-948 Duplicate
PYTHON-3239 Duplicate
PHPLIB-856 Fixed 1.13.0-beta1, 1.13.0
RUBY-2971 Fixed 2.18.0
RUST-1295 Fixed 2.4.0
SWIFT-1555 Duplicate
SWIFT-1472 Won't Do

 Description   

Summary

Downstream changes for DRIVERS-1915 mentioned that the create and collMod commands now accept a changeStreamPreAndPostImages document option, which is used to enable pre- and post-images. The commit for that issue added unified change stream spec tests with runCommand operations that execute collMod to enable changeStreamPreAndPostImages on the collection under test (originally created by initialData), but did not add any spec tests for createCollection or collMod helpers that may exist in drivers.

benji.rewis@mongodb.com pointed out that we do have a directory for collection management tests (despite not currently having a collection management spec). We should add unified tests for the changeStreamPreAndPostImages option there. Drivers without helpers can skip them as needed.

Existing spec tests reference a createCollection database operation. These would be the first tests for a collMod helper, so I'll propose we name that database operation modifyCollection unless anyone objects.

Additionally, the server team intentionally implemented changeStreamPreAndPostImages as a document (e.g. {enabled: <boolean>}), so I propose drivers do the same instead of simplifying it as a boolean type and possibly locking themselves into an API limitation down the line.

Motivation

Is this issue urgent?

No, but it should be done alongside language tickets for DRIVERS-1915.

Is this ticket required by a downstream team?

No.

Is this ticket only for tests?

Yes.



 Comments   
Comment by Githook User [ 16/May/22 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Add serverless: forbid for collection management tests (#1216)

DRIVERS-1853
DRIVERS-2294
Branch: master
https://github.com/mongodb/specifications/commit/d1458823bd810014df9da16d3a5354d2269ab865

Comment by Githook User [ 05/May/22 ]

Author:

{'name': 'Benjamin Rewis', 'email': '32186188+benjirewis@users.noreply.github.com', 'username': 'benjirewis'}

Message: DRIVERS-2294 Add createCollection and collMod tests for changeStreamPreAndPostImages (#1206)
Branch: master
https://github.com/mongodb/specifications/commit/d96789119036eaa56e4c015a1e914919e30cb379

Comment by Benji Rewis (Inactive) [ 03/May/22 ]

Spec PR: https://github.com/mongodb/specifications/pull/1206

Generated at Thu Feb 08 08:25:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.