[DRIVERS-2290] No error raised for bulkWrite with comment on <= 3.2 Created: 22/Apr/22 Updated: 17/Jun/22 Resolved: 17/Jun/22 |
|
| Status: | Closed |
| Project: | Drivers |
| Component/s: | CRUD |
| Fix Version/s: | None |
| Type: | Spec Change | Priority: | Major - P3 |
| Reporter: | Preston Vasquez | Assignee: | Preston Vasquez |
| Resolution: | Done | Votes: | 0 |
| Labels: | yaml-test | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Changes: | Needed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Downstream Changes Summary: | Drivers should sync unified crud spec tests to mongodb/specifications@b8371ea. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Compliance: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
No Error on RunCommand comment for (version <= 3.2)BulkWrite doesn't appear to error on versions <= 3.2 if a comment is included in the run command:
However, version=3.6 does result in an error:
Original DescriptionThe DBX-GO team is running into two errors when trying to implement No error on Aggregation (3.6 <= version <= 4.2)The aggregate.json spec test expects an error when using the comment query modifier on a (3.6 <= version <= 4.2) match aggregate stage. However, testing this on a 3.6.23 server does not return an error:
It may be worth noting that the 3.6 documentation includes support for aggregation comments. No Error on RunCommand comment for (version <= 3.2)Similar to the above issue, BulkWrite doesn't appear to error on versions <= 3.2 if a comment is included in the run command:
However, version=3.6 does result in an error:
|
| Comments |
| Comment by Githook User [ 27/Apr/22 ] |
|
Author: {'name': 'Preston Vasquez', 'email': 'prestonvasquez@icloud.com', 'username': 'prestonvasquez'}Message: |
| Comment by Preston Vasquez [ 26/Apr/22 ] |
|
patrick.freed@mongodb.com Absolutely, I will do that right now. |
| Comment by Preston Vasquez [ 25/Apr/22 ] |
|
dmitry.rybakov@mongodb.com I made a PR for this ticket with the solution of adding a minimum version to the pre 4.4 spec tests. |
| Comment by Preston Vasquez [ 25/Apr/22 ] |
|
dmitry.rybakov@mongodb.com Yes, that is right. |
| Comment by Dmitry Rybakov [ 25/Apr/22 ] |
|
preston.vasquez@mongodb.com It looks like the only issue left unresolved is "No Error on RunCommand comment for (version <= 3.2)" – am I right? |
| Comment by Preston Vasquez [ 25/Apr/22 ] |
|
jmikola@mongodb.com shane.harvey@mongodb.com It appears the go driver doesn't support documents for aggregation comments in any version. The current solution in this edge case is to always convert documents to json strings in test, which is why the aggregate test in question is not resulting in an error. Thank you for helping me understand this. Jeremy including the "Change Stream" component was a mistake, I will remove it now. |
| Comment by Jeremy Mikola [ 25/Apr/22 ] |
|
It's quite possible that older server versions were inconsistent in validating command documents for unsupported options. In that case, the easy fix for the bulkWrite test failing on <= 3.2 would be to specify a minServerVersion of 3.6 (drivers need not support earlier server versions at this point). preston.vasquez@mongodb.com: Also, what is the relevance to the Change Stream spec here? Both tests you referenced are located within the CRUD spec. I concur with shane.harvey@mongodb.com's assessment about the first failure in aggregate.json. The test in question is using a document comment, but the shell example you provided in the OP is using a string. Please re-confirm if the actual spec test is failing there. I'll assign these to dmitry.rybakov@mongodb.com to follow up on. |