Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition when registering new driver #645

Closed
1 of 5 tasks
bruwozniak opened this issue Jul 6, 2020 · 0 comments
Closed
1 of 5 tasks

Race condition when registering new driver #645

bruwozniak opened this issue Jul 6, 2020 · 0 comments
Labels

Comments

@bruwozniak
Copy link
Contributor

Describe the bug

I generated a new driver using the handy generator. Without any modification, I start the debug session, and in the new window that opened I try to add a new connection using the injected driver.
Unfortunately, the driver is missing from the list of installed drivers (I have Postgres driver installed from the Marketplace too, and that does show up).

However, after lots of trial and error, I managed to get it to show up. The trick is to set a brakpoint on the line
api.registerPlugin(plugin); of extension.ts, and after opening the new connection menu, then resuming from said breakpoint, the new driver does appear in the list.
Further, it seems that the driver is loaded, as connections created using it "work" even if the driver is not listed in the new connection assistant.

Therefore it seems there might be some race condition when registering the generated driver skeleton.
Unfortunately, my knowledge of this extension is not sufficient to diagnose this tricky issue further.

To Reproduce
Steps to reproduce the behavior:

  1. Generate driver with the generator
  2. Open debug session
  3. Try to create a new connection using generated driver in the assistant.
  4. Driver is missing from the menu

Expected behavior
To see the driver in the list

Desktop (please complete the following information):

  • SQLTools Version: v0.22.10
  • VSCode Version: 1.46.1
  • Generator version: 0.1.4
  • OS: macOS 10.14.6
  • Driver:
    • PostgreSQL/Redshift
    • MySQL/MariaDB
    • MSSQL/Azure
    • SQLite
    • Other: generated unmodified driver scaffolding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant