Azure / azure-cosmosdb-ads-extension

Azure Data Studio extension for Azure CosmosDB
MIT License
16 stars 10 forks source link

"Cluster Server" property incorrectly set as "True" in Connection Details for new connection selected from Azure tree #98

Closed languy closed 1 year ago

languy commented 1 year ago

ADS version: 1.45.0 Extension version: 0.3.5 Repro steps:

  1. Click on new connection button
  2. Select Browse to browse your Azure resources
  3. Select a regular Cosmos DB for Mongo API account (not a Cosmos DB vcore mongo)
  4. The information in Connection Details will be automatically filled: "Cluster Server" is set as "True", but it should be set as "False". image

Even when setting is to "False", the code will incorrectly interpret this property and the "Overview" section of the account dashboard will not update.

Root cause: It appears that this change no longer works. It sets the isServer as false boolean, but the "Connection Details" UI will still display as "True". If I modify the code to set isServer to a string "false" or "true" and perform checks against a string (e.g. if (isServer === "true")) it will work as expected.

For reference:

languy commented 1 year ago

ADS issue filed here

languy commented 1 year ago

Issue is fixed in the ADS next release. For now, users must manually toggle to "False" for non-vcore mongo accounts.

99 fixes the issue on the extension side (now boolean options are passed as strings to the extension).