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

Move directConnection=true manipulation from connectMongoClient to convertConnectionModelToInfo

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Critical - P2 Critical - P2
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed

      NOTE: this MUST be done before enabling the new form, otherwise the directConnection setting won't be captured in the initial migration and will require a new migration to keep backward compatibility.

      It can be done even before the new form is ready, as it would work well also with the old form.

      Description:

      These lines: https://github.com/mongodb-js/compass/blob/ecda9f93d998136f566e15d6f433e3892349f054/packages/data-service/src/connect-mongo-client.ts#L104-L111

      are adding `directConnection=true` arbitrarily whenever is possible on behalf of the user, and this behaviour cannot be disabled.

      Now that `directConnection` is surfaced in the form, we want to move this to the conversion from connection model to connection info, so it will be persisted, the user will have control over it, and won't cause any unexpected behaviour anymore.

            Assignee:
            Unassigned Unassigned
            Reporter:
            maurizio.casimirri@mongodb.com Maurizio Casimirri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: