Uploaded image for project: 'VS Code Extension'
  1. VS Code Extension
  2. VSCODE-234

Set `directConnection=true` on the connection model for relevant connections

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.4.1
    • Affects Version/s: None
    • Component/s: Connectivity
    • Labels:
      None
    • Not Needed
    • Iteration Vegetable

      Currently we set `directConnection=true` on the connection model when we connect:
      https://github.com/mongodb-js/connection-model/blob/master/lib/connect.js#L228
      With playgrounds the connection options we pass do not currently . This is to ensure that any connections using that connection model which don't use that connect method, like compass-shell or vscode playgrounds also have `directConnection=true`.

      When `directConnection` is already set on the connection model we should not override it.

      In mongodb node driver v4.0 this change around not setting `directConnection=true` when connecting will land. The driver 3.6.3 version prematurely added this change which was reverted in 3.6.4: https://github.com/mongodb/node-mongodb-native/commit/617d9dec5180c5f7b67bd8c944c168d4cbd27e1c 

      This impacts the playground runtime.
      Related github issue: https://github.com/mongodb-js/vscode/issues/249 

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            rhys.howell@mongodb.com Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: