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] Fix setup server expressions cache; move to mount #108473

Merged
merged 1 commit into from
Aug 13, 2021

Conversation

clintandrewhall
Copy link
Contributor

@clintandrewhall clintandrewhall commented Aug 13, 2021

Fixes #107756

Summary

#107350 moved the server function wrappers logic to its own module to simplify refactoring when we address #105675. It had a side-effect where the setup portion of the lifecycle was being run and making an API call to Canvas on every page load.

This PR:

  • returns the cache to a module-level variable, and
  • runs the registration on mount, (so you don't see a call to Canvas on the first page load that might not be Canvas).

This is a simple fix for a setup file that will be removed when we fix #105675.

@clintandrewhall clintandrewhall added review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:small Small Level of Effort v8.0.0 release_note:skip Skip the PR/issue when compiling release notes impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Feature:Canvas v7.15.0 labels Aug 13, 2021
@clintandrewhall clintandrewhall requested a review from a team as a code owner August 13, 2021 02:02
@elasticmachine
Copy link
Contributor

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

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@clintandrewhall clintandrewhall added the auto-backport Deprecated - use backport:version if exact versions are needed label Aug 13, 2021
@clintandrewhall clintandrewhall enabled auto-merge (squash) August 13, 2021 16:38
Copy link
Contributor

@crob611 crob611 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Aug 13, 2021
…108571)

Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
@clintandrewhall clintandrewhall deleted the canvas/fns branch December 29, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Canvas impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.15.0 v8.0.0
Projects
None yet
4 participants