Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2210

Fix server version incompatibility for updateOne-let and updateMany-let server-side error tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • CRUD
    • Needed
    • Hide

      The minServerVersion was updated for some test cases in the updateOne-let and updateMany-let CRUD spec tests. Drivers should sync CRUD spec tests to mongodb/specifications@4a8ac5f.

      Show
      The minServerVersion was updated for some test cases in the updateOne-let and updateMany-let CRUD spec tests. Drivers should sync CRUD spec tests to mongodb/specifications@4a8ac5f .

    Description

      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).

      Attachments

        Issue Links

          Activity

            People

              dmitry.rybakov@mongodb.com Dmitry Rybakov
              jmikola@mongodb.com Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: