Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3920

Validate repeated non-list options in connection strings

    • 2
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Use Case

      We currently don't validate repeated options, which have undefined behavior per the spec unless the option is a list. The spec says we should warn users when we are provided such repeated options, which we do not currently do. Since we prefer to throw errors in such situations, we should fix our validation to do the check for repeated non-list type options.

      User Impact

      • Breaking Change Existing repeated URI option entries will start throwing upon constructing a MongoClient

      Dependencies

      • None

      Unknowns

      • readPreferenceTags is the only repeated "list" option I'm aware of. Are there others?
        • There are no others

      Acceptance Criteria

      Implementation Requirements

      • When the URI options have been parsed validate that the result does not have multiple entries for options that do not support multiple entries

      Testing Requirements

      • Unit test sample connection strings with repeated options

      Documentation Requirements

      • Release notes about the breakage

      Follow Up Requirements

      • None

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            daria.pardue@mongodb.com Daria Pardue
            Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: