-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Remove WebSockets from Canvas expressions interpreter #29792
Conversation
behaves consistently across environments
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
retest |
💔 Build Failed |
💚 Build Succeeded |
💚 Build Succeeded |
Pinging @elastic/kibana-canvas |
packages/kbn-interpreter/src/common/interpreter/interpreter_provider.js
Outdated
Show resolved
Hide resolved
💔 Build Failed |
💚 Build Succeeded |
@stacey-gammon and @w33ble, this should be reviewable again, just FYI. |
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.
Loading a canvas workpad I got this warning, not yet sure if it's related to the PR:
> Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'nonce-8rZ8dFCSvlkMhWbM'". Either the 'unsafe-inline' keyword, a hash ('sha256-SHHSeLc0bp6xt4BoVVyUy+3IbVqp3ujLaR+s+kSP5UI='), or a nonce ('nonce-...') is required to enable inline execution. ^ A single error about an inline script not firing due to content security policy is expected!
Crossed out as it's also appearing in master
but found the TypeError: Cannot read property 'args' of undefined
from interpret.js:226
exception
💚 Build Succeeded |
💚 Build Succeeded |
💚 Build Succeeded |
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.
Reviewed the code, pulled down and just verified sample data sets loaded on canvas.
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.
Looks great! Stress testing - copying both pages of the eCommerce example 5 times, for a 10-page workpad with lots of queries on all pages showed a relatively modest update time increase (5 seconds to 4.5 seconds) - without batching.
I could load and work with workbooks, including some custom plugins.
This PR removes WebSockets from the interpreter, and uses an RPC-like function calling mechanism to run functions on the server.
This does not do any optimizations, and there is likely some leftover stuff in the server layer that needs tidying up (such as the workers / threading logic).
There is an optimization PR which builds on top of this one: #29847
Relates to #29118