You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the move away from websockets, and moving the interpreter to the browser, there was code introduced that changes how server functions work, which creates a copy of the function for use in the browser that actually sends the work to the server.
The problem is that if you have the same function defined in both registries, the browser one gets clobbered and that function will always just run on the server instead.
The to function in Canvas is a great example of this. It's a common function which Canvas registers in both browser and server function registries, but it only ever gets run on the server because the browser definition is overwritten.
Kibana version: 6.7+
Describe the bug:
With the move away from websockets, and moving the interpreter to the browser, there was code introduced that changes how server functions work, which creates a copy of the function for use in the browser that actually sends the work to the server.
The problem is that if you have the same function defined in both registries, the browser one gets clobbered and that function will always just run on the server instead.
The
tofunction in Canvas is a great example of this. It's a common function which Canvas registers in both browser and server function registries, but it only ever gets run on the server because the browser definition is overwritten.Steps to reproduce:
Use the
tofunction (prior to Fix: correctly access types from "to" function #32691)Alternatively, register a function (new or existing) in both registries and
console.logthe value ofhandlers.environment, it will always say "server"