-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Install the ZMQ prebuilt binaries and verify ZMQ works on startup #10551
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
Conversation
@@ -0,0 +1 @@ | |||
Add ZMQ library to extension |
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.
Tested on windows and linux (ubuntu 18)
new copyWebpackPlugin([{ from: './node_modules/zeromq/**/*.js' }]), | ||
new copyWebpackPlugin([{ from: './node_modules/zeromq/**/*.node' }]), | ||
new copyWebpackPlugin([{ from: './node_modules/zeromq/**/*.json' }]), | ||
new copyWebpackPlugin([{ from: './node_modules/node-gyp-build/**/*' }]) |
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.
Does this work? Will this be cross play?
I thought we'd be using the prebuilt binaries, instead of using npm install?
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 is installing the prebuilt binaries into the node_modules directory. The '.node' files are the prebuilt binaries.
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.
Then they end up in the vsix this way
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.
Otherwise it wouldn't have worked on my linux machine
Codecov Report
@@ Coverage Diff @@
## master #10551 +/- ##
==========================================
+ Coverage 60.76% 60.77% +0.01%
==========================================
Files 578 579 +1
Lines 31355 31403 +48
Branches 4464 4469 +5
==========================================
+ Hits 19052 19085 +33
- Misses 11335 11346 +11
- Partials 968 972 +4
Continue to review full report at Codecov.
|
traceInfo(`ZMQ connection to port ${port} verified.`); | ||
} catch (e) { | ||
traceError(`Exception while attempting zmq :`, e); | ||
// If this happens, disable datascience altogether. We can't talk to |
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.
Last time we discussed this I thought the plan was that in this situation they would be allowed to remote connect using the old path of specifying the URI
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.
Hmm, yes that's true. Didn't even think of making just remote connections work. Not even sure how we'd do that. That would likely be rather complex (for what might be less then 1% of users). I think we could do this for now and think about how to do just remote in a future update.
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.
I think what I could do is put this same check in a different spot (where we start a server). Then instead of disabling, I'd put up an error dialog that says the same thing, and a button that lets you pick the remote URI
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.
I like that idea as long as it's not too crazy much work. Just feels safer.
Kudos, SonarCloud Quality Gate passed!
|
|
||
export const nativeDependencyFail = localize( | ||
'DataScience.nativeDependencyFail', | ||
'{0}. We cannot launch a jupyter server for you because your OS is not supported. Select an already running server if you wish to continue.' |
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.
At first the wording here looked odd. Since we are not launching a jupyter server. But I think from the user's perspective this wording makes sense, given that we are launching essentially a "fake" jupyter server on their behalf.
} catch (e) { | ||
traceError(`Exception while attempting zmq :`, e); | ||
sendTelemetryEvent(Telemetry.ZMQNotSupported); | ||
this.zmqError = new JupyterZMQBinariesNotFoundError(e.toString()); |
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.
Why not pass in e.message
, if we're going to display this, then i'd prefer we passed a meaningfule message.
e.tostring()
will contain unstructured data.
this.zmqError = new JupyterZMQBinariesNotFoundError(e);
class JupyterZMQBinariesNotFoundError extends Error {
constructor(originalException: Error) {
super(originalException.message);
this.stack = originalException.stack;
}
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.
The message is already meaningful. It says the platform binaries are missing.
private async startOrConnect( | ||
options?: INotebookServerOptions, | ||
cancelToken?: CancellationToken | ||
): Promise<IConnection> { | ||
// If our uri is undefined or if it's set to local launch we need to launch a server locally | ||
if (!options || !options.uri) { | ||
// First verify we have ZMQ installed correctly (this might change when we don't 'launch' servers anymore) | ||
await this.verifyZMQ(); |
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.
Shouldn't this be done only if the user belongs to the ZMQ experiment?
Also, I would have expected this to go into a separate PR (hooking up experiment... ) and separate class (depending on which path to go down..).
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.
Sorry already merged.
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.
The work for the ZMQ experiment can be picked up when we add the new experiment.
* master: Move redux logging to a different file (#10605) Ensure local host only if connection not available (#10600) Fix a bunch of debugger issues (#10572) Bump acorn from 6.0.0 to 6.4.1 (#10570) Resize plot to fit within pdf page (#10547) Update dev build instructions to mention "python.insidersChannel" Install the ZMQ prebuilt binaries and verify ZMQ works on startup (#10551)
For #10483