azuredatastudio icon indicating copy to clipboard operation
azuredatastudio copied to clipboard

Allow Connection Profiles with different names

Open cssuh opened this issue 3 years ago • 4 comments

Allow connection profiles with the same server name and login name, but with unique connection names (test-name-1 and test-name-2 share the same login and server info). Screen Shot 2022-09-01 at 2 43 04 PM Previous behavior: after adding test-name-1, once I add test-name-2, it would overwrite test-name-1 because the servers share the same connection info (except for the connection names)

New behavior: test-name-1 and test-name-2 are able to be saved separately.

I did this by adding the connection name to the connection options key.

This PR fixes #19307

cssuh avatar Sep 01 '22 21:09 cssuh

@kburtram @alanrenmsft I thought there was some reason we weren't using the connection name here - I think I remember having this discussion a long time back. Any recollection why?

(to be clear - I think this is a good change and what we want. I just think we should be cautious here in case anything else was built assuming the connection name isn't going to be involved)

Charles-Gagnon avatar Sep 01 '22 22:09 Charles-Gagnon

It seems that would be "Manage" behavior. I just tested this change, and I noticed that Manage Tab doesn't change the contents as it doesn't realize the connection name.

@cssuh can you verify if its feasible to include connection name everywhere connection options key is created or if possible can we centralize this?

cheenamalhotra avatar Sep 01 '22 22:09 cheenamalhotra

After testing this more, it seems like some unexpected behaviors are stemming from this change (i.e. deleting test-name-1 deletes both of them), so if we want to go forward with this change, I will do some more work to make sure the behavior is consistent across the application, but it will take some more time, so I'll wait on responses from @kburtram and @alanrenmsft before continuing to work on this.

cssuh avatar Sep 01 '22 22:09 cssuh

@cssuh this is definitely an improvement assuming we identified and addressed the side effects, making connectionName's isIdentity to true should fix these issues. please give it a try.

alanrenmsft avatar Sep 08 '22 17:09 alanrenmsft

Closing the PR as discussed internally.

cheenamalhotra avatar Nov 07 '22 23:11 cheenamalhotra