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

[8.x] 🌊 Move streams to platform #212113

Open
wants to merge 2 commits into
base: 8.x
Choose a base branch
from

Conversation

flash1293
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

This PR moves the `streams` and `streams_app` plugins into platform so
they can be used in other solutions in the future. This PR is not
actually making it available in other solutions yet since we are still
discussing the release plans.

## Inlined helpers

As discussed before, this PR inlines a couple simple helper methods for
query building, time zone normalization, a header portal helper and a
data plugin timefilter state react integration hook as there is no good
place for these outside of the observability solution.

## streams_app plugin

The streams_app plugin is not actually registering anything, instead it
simply exports a component that renders the app which needs to be
consumed by another plugin to turn it into a registered app - for now,
`observability_streams_wrapper` takes over this job.

## observability_streams_wrapper plugin

While 99% of the streams logic is moved into the
`platform/shared/streams_app`, two bits are left behind in
`observability_streams_wrapper`:
* The actual app registration
* Integration with the observability_shared `PageTemplate` component

Once we decide streams should be displayed outside of the observability
solution, it's probably not necessary anymore to decouple app definition
and registration like this because it will always be visible no matter
the solution. Once this is the case, the navigation registration can be
moved into the central `observability` plugin, like it's handled with
other apps like infra.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 8a9bb36)

# Conflicts:
#	.github/CODEOWNERS
#	x-pack/platform/plugins/shared/streams/server/routes/streams/group/route.ts
#	x-pack/platform/plugins/shared/streams_app/kibana.jsonc
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
streamsApp 306 307 +1
streamsAppWrapper - 8 +8
total +9

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
streamsApp 8 13 +5
streamsAppWrapper - 2 +2
total +7

Async chunks

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

id before after diff
streamsApp 293.1KB 296.3KB +3.2KB

Page load bundle

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

id before after diff
streamsApp 7.1KB 6.3KB -775.0B
streamsAppWrapper - 4.7KB +4.7KB
total +4.0KB
Unknown metric groups

API count

id before after diff
streamsApp 8 17 +9
streamsAppWrapper - 2 +2
total +11

async chunk count

id before after diff
streamsApp 6 7 +1

ESLint disabled in files

id before after diff
streamsAppWrapper - 1 +1

ESLint disabled line counts

id before after diff
streamsApp 7 6 -1

References to deprecated APIs

id before after diff
streamsApp 4 6 +2

Total ESLint disabled count

id before after diff
streamsApp 11 10 -1
streamsAppWrapper - 1 +1
total -0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants