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 Reporting Service; remove legacy service #107352

Merged

Conversation

clintandrewhall
Copy link
Contributor

Reviewable portion of #103202

Summary

This PR creates a Reporting Service based on the Services Abstraction API and removes the legacy service. It also corrects a best practice problem made in #104113 where a service hook was used in a component, rather than in a container.

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 01:54
@elasticmachine
Copy link
Contributor

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

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

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

Page load bundle

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

id before after diff
canvas 25.5KB 26.1KB +631.0B

History

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 2, 2021
@clintandrewhall clintandrewhall merged commit 01eb6c7 into elastic:master Aug 2, 2021
@clintandrewhall clintandrewhall deleted the canvas/reporting-service branch August 2, 2021 18:20
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 2, 2021
)

* [canvas] Create Reporting Service; remove legacy service

* Fix merge mistake
@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 2, 2021
…107439)

* [canvas] Create Reporting Service; remove legacy service

* Fix merge mistake

Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
streamich pushed a commit to vadimkibana/kibana that referenced this pull request Aug 8, 2021
)

* [canvas] Create Reporting Service; remove legacy service

* Fix merge mistake
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