microsoft / vscode-cosmosdb

Azure Databases extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-cosmosdb
MIT License
155 stars 68 forks source link

Azure Create Database Doesn't Create a Database #2224

Closed HaydenBussard closed 6 months ago

HaydenBussard commented 8 months ago

Does this occur consistently? Repro steps:

  1. open my working folder in VS Code
  2. Click Azure extension icon on left side of screen
  3. Right-click my PostgreSQL server
  4. Click "Create Database"
  5. Enter any name for the database I'm creating
  6. Error says that the database doesnt exist.
  7. Expected result: A database gets created with the name I enter for it...

Foling the MS Learning tutorial: https://learn.microsoft.com/en-us/training/modules/django-deployment/6-deploy-azure

Action: postgreSQL.createDatabase Error type: 3D000 Error Message: database "hmbpups" does not exist

Version: 0.20.0 OS: win32 OS Release: 10.0.22621 Product: Visual Studio Code Product Version: 1.85.1 Language: en

Call Stack ``` Parser.parseErrorMessage pg-protocol/parser.js:287:98 Parser.handlePacket pg-protocol/parser.js:126:29 Parser.parse pg-protocol/parser.js:39:38 TLSSocket. pg-protocol/index.js:11:42 ```
JasonYeMSFT commented 8 months ago

Possibly related to #2180

JimacoMS4 commented 7 months ago

@JasonYeMSFT Getting the same issue while trying to validate VS Code steps in this MS Learn article: https://learn.microsoft.com/en-us/azure/developer/python/tutorial-deploy-python-web-app-azure-container-apps-02?tabs=azure-cli%2Ccreate-database-vscode-aztools#create-a-database-on-the-server. I've also verified my experience with a co-worker. NOTE: Both of us created a firewall rule that accepts all IP addresses in our Flexible Server instances.

Here's a dump of my VS code about info:

Version: 1.85.2 (user setup) Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:10.514Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22631

Here's the version of the Azure Databases extension: v0.20.1

Is there any status update for these two issues (this issue plus the linked one)? Thanks!

JasonYeMSFT commented 6 months ago

@JimacoMS4 I found a bug that causes the code to incorrectly try to connect to the database before it is created. I will think of a fix for this bug.