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] Create Expressions Service; remove legacy service #107350

Merged

Conversation

clintandrewhall
Copy link
Contributor

Reviewable portion of #103202

Summary

This PR creates an Expressions Service based on the Services Abstraction API and removes the legacy service. A portion of this PR will be refactored once all services are converted, (see #105675).

This PR also (finally) refactors ElementContent to remove recompose.

What is this?

In #88112 the Presentation Team created a Service Abstraction API which allows any of our solutions to uniformly (and safely) create abstractions between external services and the means by which we use them. It also provides a standard method for "swapping" service implementations at "start" time, (e.g. Kibana setup/start, or Storybook start, or Jest setup, etc). That means, for example, Storybook Controls can give arguments to the services to adjust mocks on-the-fly from the Storybook application.

For more information, check out the docs.

Canvas already had a rough service abstraction layer that was a bit rigid, but was also unsafe: the singleton providing services was defined as a module-level constant. This means it exists and can be accessed outside the setup/start lifecycle of a Kibana plugin. 😞

This forthcoming collection of PRs moves each individual service abstraction to our "official" API and removes the legacy service. This makes it easier to review and test each service.

@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:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Feature:Canvas v7.15.0 labels Aug 2, 2021
@clintandrewhall clintandrewhall requested a review from a team as a code owner August 2, 2021 00:34
@elasticmachine
Copy link
Contributor

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

@clintandrewhall clintandrewhall force-pushed the canvas/expressions-service branch from 031f27f to 74c5881 Compare August 2, 2021 16:04
@clintandrewhall clintandrewhall added the auto-backport Deprecated - use backport:version if exact versions are needed label Aug 2, 2021
@clintandrewhall clintandrewhall enabled auto-merge (squash) August 2, 2021 16:05
@clintandrewhall clintandrewhall force-pushed the canvas/expressions-service branch from 74c5881 to c115be0 Compare August 2, 2021 18:27
@clintandrewhall clintandrewhall force-pushed the canvas/expressions-service branch from c115be0 to 9ff5def Compare August 2, 2021 18:51
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
canvas 992 993 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
canvas 1.5MB 1.5MB -1.7KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
canvas 26.1KB 27.0KB +891.0B
Unknown metric groups

References to deprecated APIs

id before after diff
canvas 53 50 -3

History

  • 💔 Build #142420 failed c115be0d27705d800a7ffced1104d245a9fdd389
  • 💛 Build #142373 was flaky 74c5881768633e1ef75abc5c3649b025553cf7b4
  • 💚 Build #142156 succeeded 031f27f61ca69a5fabeee85f58e951a40bbbe662

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

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

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:medium Addressing this issue will have a medium 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
Development

Successfully merging this pull request may close these issues.

4 participants