[COMPASS-6069] Implement command-line connection string/file support Created: 30/Aug/22  Updated: 29/Oct/23  Resolved: 11/Oct/22

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

Type: Story Priority: Major - P3
Reporter: Anna Henningsen Assignee: Anna Henningsen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on COMPASS-6070 Implement command-line argument parser Closed
Documented
Related
is related to COMPASS-6216 Support username and password CLI arg... Closed
Epic Link: COMPASS-5816
Story Points: 8
Documentation Changes: Needed
Documentation Changes Summary:

Compass allows specifying a connection string or connection on the command line. Similar to DOCSP-25219, Compass is invoked through the path to its executable.

Variant 1: Specify a connection string

Compass can be run as "<path/to/compass/executable> <connection string>", e.g. mongodb-compass mongodb://my.cluster.mongodb.net/.

Variant 2: Specify a connection from an exported connection file

DOCSP-25219 describes how to export connections into a file. This can include more information than a connection string, such as In-Use Encryption parameters or SSH tunnel parameters. If such a file is present, Compass can be run as "<path/to/compass/executable> --file=<filename> [--passphrase=<passphrase>] [<connection id>]", where "filename" is the filename to the connections list file, "passphrase" is the passphrase provided when exporting connections (if any). "connection id" is the value of the "id" attribute in the connections list file and only needs to be specified if there is more than one connection in the exported file.

Compass will attempt to connect automatically in these cases. If there is an error while loading, parsing or decrypting the connection string/file, or an error while connecting, Compass will still display its UI and act as if the error came from a regular connection attempt through the connection form.

We expect this feature to be used in conjunction with the --protectConnectionStrings command line option, which is going to be implemented in COMPASS-6066.

Sprint: Iteration Kraken, Iteration Lobster

 Description   

This includes automatically filling the connection form and connecting to the server, and displaying an error alongside the connection form if this fails (as we currently do).



 Comments   
Comment by Githook User [ 20/Oct/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat: add support for automatically connecting based on CLI args COMPASS-6069 (#3528)
Branch: 1.34-releases
https://github.com/mongodb-js/compass/commit/cc94f77fa369dc1c1d3cb852e488779fbfb53a8a

Comment by Githook User [ 19/Oct/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat: add support for automatically connecting based on CLI args COMPASS-6069 (#3528)
Branch: COMPASS-6064-implement-readonly-option
https://github.com/mongodb-js/compass/commit/cc94f77fa369dc1c1d3cb852e488779fbfb53a8a

Comment by Githook User [ 17/Oct/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat: add support for automatically connecting based on CLI args COMPASS-6069 (#3528)
Branch: update-compass-shell-to-shared-config
https://github.com/mongodb-js/compass/commit/cc94f77fa369dc1c1d3cb852e488779fbfb53a8a

Comment by Githook User [ 13/Oct/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat: add support for automatically connecting based on CLI args COMPASS-6069 (#3528)
Branch: move-from-confirmation-modal
https://github.com/mongodb-js/compass/commit/cc94f77fa369dc1c1d3cb852e488779fbfb53a8a

Comment by Githook User [ 12/Oct/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat: add support for automatically connecting based on CLI args COMPASS-6069 (#3528)
Branch: COMPASS-6164-pipeline-parser
https://github.com/mongodb-js/compass/commit/cc94f77fa369dc1c1d3cb852e488779fbfb53a8a

Comment by Githook User [ 11/Oct/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat: add support for automatically connecting based on CLI args COMPASS-6069 (#3528)
Branch: COMPASS-6132-move-close-button-in-interactive-popover
https://github.com/mongodb-js/compass/commit/cc94f77fa369dc1c1d3cb852e488779fbfb53a8a

Comment by Githook User [ 11/Oct/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: feat: add support for automatically connecting based on CLI args COMPASS-6069 (#3528)
Branch: main
https://github.com/mongodb-js/compass/commit/cc94f77fa369dc1c1d3cb852e488779fbfb53a8a

Comment by Githook User [ 28/Sep/22 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: feat: add support for automatically connecting based on CLI args COMPASS-6069
Branch: 6069-dev
https://github.com/mongodb-js/compass/commit/1f0dfb49fda8cb987aeb28c1241281caeceff465

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