[COMPASS-4085] Prevent attemping a connection when the connection string is invalid Created: 14/Jan/20  Updated: 11/Nov/21  Resolved: 11/Nov/21

Status: Closed
Project: Compass
Component/s: UI / UX
Affects Version/s: 1.20.4
Fix Version/s: No version

Type: New Feature Priority: Major - P3
Reporter: Mark Baker-Munton Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tested on OSX


Attachments: PNG File empty-connection-string.png     PNG File invalid-connection-string.png     PNG File partially-invalid-connection-string.png    
Epic Link: COMPASS-4948
Story Points: 2
Documentation Changes: Not Needed

 Description   

The connect button is enabled even when the connection string is invalid or blank.

Attempting connection with a blank connection string results in a timeout.
Attempting connection with an totally invalid connection string hangs indefinitely.
Attempting connection with a partially invalid connection string results in a timeout.

It is quite common for users to get the connection string from the Atlas console (with placeholders for user/password,  paste it into Compass and immediately click connect without changing the placeholders.

mongodb+srv://<username>:<password>@paymentsatlasdevelopment-hegpc.mongodb.net/test

Suggest we disable the connect button unless the connection string is valid?



 Comments   
Comment by Maurizio Casimirri [ 11/Nov/21 ]

Closing this as it is going to be solved with the new designs

Comment by Maurizio Casimirri [ 27/Aug/21 ]

mark.baker-munton, thanks for reporting this, and sorry for the extremely late triage.

Compass right now allows the user to cancel a connection attempt, also connecting with an empty string would attempt to connect to localhost:27017. This is an optimization we would like to keep for now, since most users are on localhost.

A totally invalid connection would not hang indefinitely anymore with 1.28.1.

About the copy paste from Altas console use case: we will address this as part of the project to improve the connection form and model of Compass: https://jira.mongodb.org/browse/COMPASS-4948.

We decided to only add a warning if the username is ‘<username>’ and the connection string matches that of an atlas cluster. In general `<username>` would be a legit username for mongodb, but not in Atlas, which makes this a safe check.

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