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

[Expressions] expressions setup/start contract leak wrong functions #106509

Closed
ppisljar opened this issue Jul 22, 2021 · 1 comment · Fixed by #110841
Closed

[Expressions] expressions setup/start contract leak wrong functions #106509

ppisljar opened this issue Jul 22, 2021 · 1 comment · Fixed by #110841
Labels
bug Fixes for quality problems that affect the customer experience Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort technical debt Improvement of the software architecture and operational architecture

Comments

@ppisljar
Copy link
Member

expressions setup and start contract expose functions they shouldn't:

  • setup contract exposes run which should only be available in start when all the plugins had a chance to register their functions
  • start contract exposes fork which should only be available in setup so function registration can happen in time

on top of that forked expression service exposes all the methods at all times (so addFunction, addType etc can be called in start or after and run and execute can be called in setup) this should be cleaned up so fork is only available in setup, it returns setup contract of fork and a function to call to get start contract of fork, which should have a guard against using it before start.

we should also add guards in addFunction and addType methods to prevent them from being called after setup (even if consumer ignores the types)

note: some consumers of expressions are already registering functions at wrong times, we should investigate if that can be easily changed.

@ppisljar ppisljar added bug Fixes for quality problems that affect the customer experience Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) loe:medium Medium Level of Effort technical debt Improvement of the software architecture and operational architecture Team:AppServices impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Jul 22, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:medium Medium Level of Effort technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants