Skip to content

Interpreter clobbers browser functions with server functions #33039

@w33ble

Description

@w33ble

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 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.

Steps to reproduce:

  1. Use the to function (prior to Fix: correctly access types from "to" function #32691)

  2. Alternatively, register a function (new or existing) in both registries and console.log the value of handlers.environment, it will always say "server"

Metadata

Metadata

Assignees

Labels

Feature:ExpressionLanguageInterpreter expression language (aka canvas pipeline)bugFixes for quality problems that affect the customer experience

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions