Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-4612

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

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: Connectivity
    • Labels:
      None
    • 3
    • 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
      Using these conditions we should instead set it on the connection model by default, not only when connecting. 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 both VSCode (playground runtime) and Compass (Compass shell connection arguments).

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

              Created:
              Updated:
              Resolved: