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

Connection String: make delimiting slash between hosts and options optional

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Component/s: Connection String
    • None
    • Needed
    • Hide

      AC

      Implementation Requirements

      • Ensure that URI parsing logic treats the delimiting slash between hosts and client options as optional
        • E.g.: The URI string "mongodb://example.com?w=1" should parse without error and yield the same results as "mongodb://example.com/?w=1"

      Testing Requirements

      • Sync connection string spec tests updated in this PR
        • affects connection-string/tests/invalid-uris.{yml,json} and connection-string/tests/valid-options.{yml,json}
      Show
      AC Implementation Requirements Ensure that URI parsing logic treats the delimiting slash between hosts and client options as optional E.g.: The URI string "mongodb://example.com?w=1" should parse without error and yield the same results as "mongodb://example.com/?w=1" Testing Requirements Sync connection string spec tests updated in this PR affects connection-string/tests/invalid-uris.{yml,json } and connection-string/tests/valid-options.{yml,json }
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-4726 Fixed 1.28.0
      CXX-2756 Backlog
      CSHARP-4792 Fixed 2.22.0
      GODRIVER-2991 Backlog
      JAVA-5166 Fixed 5.2.0
      NODE-5643 Done
      MOTOR-1190 Duplicate
      PYTHON-3962 Fixed 4.6
      PHPC-2294 Fixed 1.20.0
      RUBY-3329 Fixed 2.20.0
      RUST-1765 Backlog
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-4726 Fixed 1.28.0 CXX-2756 Backlog CSHARP-4792 Fixed 2.22.0 GODRIVER-2991 Backlog JAVA-5166 Fixed 5.2.0 NODE-5643 Done MOTOR-1190 Duplicate PYTHON-3962 Fixed 4.6 PHPC-2294 Fixed 1.20.0 RUBY-3329 Fixed 2.20.0 RUST-1765 Backlog

       

      Summary

      Some drivers(Node, .NET/C#) currently permit omitting the delimiting slash which separates the hosts and options, but the spec contains tests and language that imply that this slash is required. Making these drivers spec compliant would be a breaking change for many users as it would also make connection strings incompatible with standard URL syntax.

      This change would loosen the spec to make the delimiting slash optional.

      Motivation

      Who is the affected end user?

      Driver users, Driver Engineers

      How does this affect the end user?

      Would guarantee that, regardless of driver, connection strings in URL format will always work as expected.

      How likely is it that this problem or use case will occur?

      Somewhat likely as it is common practice in URLs to omit the trailing slash when providing options

      If the problem does occur, what are the consequences and how severe are they?

      Minor annoyance

      Is this issue urgent?

      No

      Is this ticket required by a downstream team?

      Needed by e.g. Atlas, Shell, Compass?

      Is this ticket only for tests?

      No, this ticket will require a change to the langauge in the Host Information section of the Connection String spec, changing it from.

       

      Unlike a standard URI, the connection string allows for identifying multiple hosts. The host information section of the connection string is delimited by the trailing slash ("/") or end of string.

       

      to

       

      Unlike a standard URI, the connection string allows for identifying multiple hosts. The host information section of the connection string MAY be delimited by the trailing slash ("/") or end of string.

       

      Acceptance Criteria

      Driver changes

      • Drivers will need to sync their connection string spec tests and address any failures that the updated test/s will cause

            Assignee:
            warren.james@mongodb.com Warren James
            Reporter:
            warren.james@mongodb.com Warren James
            Jeffrey Yemin Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: