[DRIVERS-2679] Connection String: make delimiting slash between hosts and options optional Created: 24/Jul/23  Updated: 18/Sep/23

Status: Implementing
Project: Drivers
Component/s: Connection String
Fix Version/s: None

Type: Spec Change Priority: Minor - P4
Reporter: Warren James Assignee: Warren James
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to CDRIVER-4726 Connection String: make delimiting sl... Backlog
split to CXX-2756 Connection String: make delimiting sl... Backlog
split to GODRIVER-2991 Connection String: make delimiting sl... Backlog
split to JAVA-5166 Connection String: make delimiting sl... Backlog
split to RUST-1765 Connection String: make delimiting sl... Backlog
split to PHPC-2294 Connection String: make delimiting sl... Blocked
split to CSHARP-4792 Connection String: make delimiting sl... Closed
split to MOTOR-1190 Connection String: make delimiting sl... Closed
split to PYTHON-3962 Connection String: make delimiting sl... Closed
split to RUBY-3329 Connection String: make delimiting sl... Closed
split to NODE-5643 Sync Connection String spec tests Scheduled
Related
related to NODE-3919 Add validation when missing delimitin... Closed
Driver Changes: Needed
Downstream Changes Summary:

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}
Engineering Lead: Jeffrey Yemin Jeffrey Yemin
Start date:
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4726 Backlog
CXX-2756 Backlog
CSHARP-4792 Fixed 2.22.0
GODRIVER-2991 Backlog
JAVA-5166 Backlog
NODE-5643 Scheduled
MOTOR-1190 Duplicate
PYTHON-3962 Fixed 4.6
PHPC-2294 Blocked
RUBY-3329 Fixed 2.20.0
RUST-1765 Backlog

 Description   

 

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


 Comments   
Comment by Githook User [ 18/Sep/23 ]

Author:

{'name': 'Warren James', 'email': 'warren.james@mongodb.com', 'username': 'W-A-James'}

Message: DRIVERS-2679: make delimiting slash between hosts and connection options optional (#1447)

Co-authored-by: Andreas Braun <alcaeus@users.noreply.github.com>
Branch: master
https://github.com/mongodb/specifications/commit/e09b41df206f9efaa36ba4c332c47d04ddb7d6d1

Generated at Thu Feb 08 08:26:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.