-
Type: Epic
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Component/s: Connection String, URI Options
-
None
-
To Do
-
Require Drivers to raise errors for invalid URI Option Keys and Values
-
0
-
0
-
0
-
100
While sara.golemon was implementing CDRIVER-2869. she noticed that the "Valid required tls options are parsed correctly" test in tls-options.json failed because the spec expects a valid URI string and a logged warning. That agrees with the last paragraph in Connection String Spec: Values:
Any invalid Values for a given key MUST be ignored and MUST log a WARN level message)
That said, I'm curious why we don't allow hard errors on such cases. The current spec behavior of logging a warning and ignoring the value could make it quite easy for users to miss the problem.
Elsewhere in the connection string spec, warnings are suggested for using deprecated options (e.g. "yes" string for a boolean), which makes more sense as we're still applying the value and not ignoring it. In that case, there's no harm if the user misses a warning (hopefully they see the warning and fix the URI); however, if support for a deprecated option/value was ultimately dropped the driver would still only log a warning despite a likely behavioral change for the user's application.
I'd propose that we at least allow drivers to raise an error for invalid (not merely deprecated) values. This would require some care when updating the tests, since we wouldn't want to simply remove existing test cases with invalid values.
- depends on
-
DRIVERS-2655 Include Connection URI Options as Handshake Metadata
- Closed
- is related to
-
CDRIVER-2869 Implement Unified URI Options
- Closed
- related to
-
CDRIVER-3167 URI Spec conformance
- Backlog
- split to
-
CDRIVER-4558 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
-
CSHARP-4484 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
-
CXX-2639 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
-
GODRIVER-2738 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
-
JAVA-4847 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
-
MOTOR-1085 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
-
NODE-4972 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
-
PHPLIB-1067 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
-
PYTHON-3572 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
-
RUBY-3207 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
-
RUST-1572 Require Drivers to raise errors for invalid URI Option Keys and Values
- Closed
- links to