[COMPASS-5557] Fix `readPreferenceTags` parsing in new connection form Created: 01/Mar/22  Updated: 01/Mar/22  Resolved: 01/Mar/22

Status: Closed
Project: Compass
Component/s: Connectivity
Affects Version/s: None
Fix Version/s: No version

Type: Bug Priority: Major - P3
Reporter: Rhys Howell Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-03-01 at 3.08.21 PM.png    
Epic Link: COMPASS-4948
Documentation Changes: Not Needed
Sprint: Iteration Wolverhampton

 Description   

Currently the connection form errors when setting the `readPreferenceTags` in the `Advanced` options tab. When we fix this we should also ensure `authMechanismProperties` are handled well too since they're also an array param property.

Error is `Cannot have undefined values in key value pairs` might be coming from parsing in https://github.com/mongodb-js/mongodb-connection-string-url



 Comments   
Comment by Rhys Howell [ 01/Mar/22 ]

Not a bug, it's looking for a key value pair. https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.readPreferenceTags
Interestingly the old shell and driver won't error with a malformed `readPreferenceTags`, so maybe we should be more lenient.

Generated at Wed Feb 07 22:40:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.