vscode-cosmosdb icon indicating copy to clipboard operation
vscode-cosmosdb copied to clipboard

Fail to delete a PostgreSQL server

Open v-xinda opened this issue 2 years ago • 4 comments

OS: Win10 Build Version: 20220514.1

Repro Steps:

  1. Right click a PostgreSQL server -> Click "Delete...".
  2. .Check whether succeeds to delete a PostgreSQL server.

Expect: Succeed to delete a PostgreSQL server.

Actual: Fail to delete a PostgreSQL server. image

v-xinda avatar May 16 '22 08:05 v-xinda

This seems to be an issue with keytar. The server still actually deletes successfully, but the password isn't being correctly deleted. We could suppress the JSON parsing error for now.

nturinski avatar May 16 '22 23:05 nturinski

We could suppress the JSON parsing error for now.

We should consult the rest of the team, but that sounds good to me. It might be nice to have a better understanding of the keytar issues though.

alexweininger avatar May 17 '22 00:05 alexweininger

Related to https://github.com/microsoft/vscode-azurestorage/issues/1045 (since it's all keytar related)

nturinski avatar May 17 '22 06:05 nturinski

Here is the fix for Storage

nturinski avatar Aug 18 '22 22:08 nturinski

I believe this has been fixed. The extension has replaced keytar with vscode secret storage module.

JasonYeMSFT avatar Sep 20 '23 18:09 JasonYeMSFT

@JasonYeMSFT This issue also reproduces on the build 20230920.5. An error occurs after deleting a PostgreSQL account. image image The PostgreSQL account disappears after refreshing the Resource view.

v-xinda avatar Sep 21 '23 06:09 v-xinda

I may have misunderstood the status of the migration to secretStorage. The work is done but the latest release is still using keytar (I thought it isn't). We don't have any migration code in place so it would be a little bizarre for people who just upgraded to 0.20.0. I'll make sure at least it doesn't have any consequences and won't block users.

JasonYeMSFT avatar Sep 25 '23 17:09 JasonYeMSFT

I tried but I am not able to reproduce this issue. From the code point of view, this could happen if there are is a concurrently execution that attempts to read that node which has been partially destroyed. I will close this issue for now given that the consequence is small and the deletion does complete.

JasonYeMSFT avatar Sep 25 '23 18:09 JasonYeMSFT