Skip to content
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

[Canvas] Migrate expression runner from bfetch to an HTTP route #190267

Closed
lukasolson opened this issue Aug 9, 2024 · 2 comments · Fixed by #191031
Closed

[Canvas] Migrate expression runner from bfetch to an HTTP route #190267

lukasolson opened this issue Aug 9, 2024 · 2 comments · Fixed by #191031
Labels
impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort performance refactoring Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@lukasolson
Copy link
Member

Summary

As part of getting ready to remove the bfetch plugin (see #186139), we need to move consumers of the bfetch services off of it.

Currently, Canvas utilizes bfetch for running an expression:

bfetch.addBatchProcessingRoute(API_ROUTE_FUNCTIONS, (request) => {
return {
onBatchItem: async (fnCall: FunctionCall) => {
const handlers = {
environment: 'server',
};
const result = await runFunction(handlers, fnCall);
if (typeof result === 'undefined') {
throw new Error(`Function ${fnCall.functionName} did not return anything.`);
}
return result;
},
};
});

This needs to be moved into a regular HTTP route before we can remove the bfetch plugin.

@lukasolson lukasolson added performance refactoring Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:medium Medium Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) labels Aug 9, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort performance refactoring Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants