-
Notifications
You must be signed in to change notification settings - Fork 94
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
Connections: Create SQLite connection #6380
Conversation
E2E Tests 🚀 |
} | ||
|
||
for (const pkg of this.packages) { | ||
const installed = await session.callMethod?.('is_installed', pkg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs some exception handling; if callMethod
throws I think the exception should be logged (and we should probably presume the dependencies to be installed since otherwise the user will be blocked as I understand it?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory this is handled on the call site of checkDependencies
and installDependencies
:
Lines 66 to 83 in 2122937
try { | |
if (!props.selectedDriver.connect) { | |
throw new Error( | |
localize('positron.newConnectionModalDialog.createConnection.connectNotImplemented', "Connect method not implemented") | |
); | |
} | |
if (props.selectedDriver.checkDependencies && props.selectedDriver.installDependencies) { | |
const dependenciesInstalled = await props.selectedDriver.checkDependencies(); | |
if (!dependenciesInstalled) { | |
await props.selectedDriver.installDependencies(); | |
} | |
} | |
await props.selectedDriver.connect(code); | |
} catch (err) { | |
services.notificationService.error(err); | |
} |
But indeed, they wouldn't be able to run connect()
if checking for the dependencies fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With 2bfb463 we now presume that upon failure to check if dependencies are installed we can continue and try to connect.
} | ||
|
||
for (const pkg of this.packages) { | ||
const installed = await session.callMethod?.('is_installed', pkg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, need exception handling here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2bfb463
to
2f71450
Compare
Addresses #6185
Additionaly, add support for checking and installing package dependencies when they are not installed.
Release Notes
New Features
Bug Fixes
QA Notes
Try creating a new SQLite connection with both R and Python. Make sure the generated code executes correctly.
Possibly try running in an R environment where packages are not available, so you can test the installation steps.
@:connections