bailey.pearson observed that the updateOne-let.yml and updateMany-let.yml tests introduced in mongodb/specifications@1519da9 for DRIVERS-1788 use pipeline-style updates (4.2+) despite the tests specifying a minServerVersion of 3.6.0.
These tests should either have minServerVersion bumped to 4.2.0 or be changed to not use pipeline-style updates.
Per the docs examples in Use Variables in let Option or c Field, it looks like we can reference bound variables in the update's query by using $expr to access the aggregation context. This should be portable for pre-4.2 servers if we'd rather not bump the minServerVersion.
AFAIK, $expr cannot be used in a non-pipeline update, so we'd need to require 4.2+ if we still want to access the bond variables from the update itself (i.e. u parameter).
- related to
-
DRIVERS-2226 Fix server version incompatibility for bulkWrite updateOne and updateMany server-side error tests of let support
- Closed
- split to
-
CSHARP-4059 Fix server version incompatibility for updateOne-let and updateMany-let server-side error tests
- Closed
-
CXX-2455 Fix server version incompatibility for updateOne-let and updateMany-let server-side error tests
- Closed
-
GODRIVER-2313 Fix server version incompatibility for updateOne-let and updateMany-let server-side error tests
- Closed
-
MOTOR-898 Fix server version incompatibility for updateOne-let and updateMany-let server-side error tests
- Closed
-
NODE-4013 Fix server version incompatibility for updateOne-let and updateMany-let server-side error tests
- Closed
-
PYTHON-3129 Fix server version incompatibility for updateOne-let and updateMany-let server-side error tests
- Closed
-
RUBY-2910 Fix server version incompatibility for updateOne-let and updateMany-let server-side error tests
- Closed
-
RUST-1188 Fix server version incompatibility for updateOne-let and updateMany-let server-side error tests
- Closed
-
PHPLIB-748 Support 'let' option for multiple CRUD commands
- Closed
-
JAVA-4497 Fix server version incompatibility for updateOne-let and updateMany-let server-side error tests
- Closed
-
CDRIVER-4198 Support 'let' option for multiple CRUD commands
- Closed