azuredatastudio
azuredatastudio copied to clipboard
Allow Connection Profiles with different names
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).
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
@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)
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?
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 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.
Closing the PR as discussed internally.