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

[ML] Reduce ml async bundle loading on Kibana page load #193761

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

walterra
Copy link
Contributor

Summary

WORK IN PROGRESS

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@elasticmachine
Copy link
Contributor

elasticmachine commented Sep 23, 2024

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 23, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #10 / anomaly_scores show a popover on a mouse click
  • [job] [logs] Jest Tests #10 / anomaly_scores show a popover on a mouse click
  • [job] [logs] Jest Tests #10 / anomaly_scores showing a popover on a mouse click
  • [job] [logs] Jest Tests #10 / anomaly_scores showing a popover on a mouse click
  • [job] [logs] Jest Tests #10 / create_description_list it calls the narrow date range function on click
  • [job] [logs] Jest Tests #10 / create_description_list it calls the narrow date range function on click
  • [job] [logs] Jest Tests #10 / create_description_list it should call the narrow date range with the interval
  • [job] [logs] Jest Tests #10 / create_description_list it should call the narrow date range with the interval
  • [job] [logs] Jest Tests #10 / create_description_list it should the narrow date range with the score
  • [job] [logs] Jest Tests #10 / create_description_list it should the narrow date range with the score
  • [job] [logs] Jest Tests #10 / create_explorer_link it returns expected link
  • [job] [logs] Jest Tests #10 / create_explorer_link it returns expected link

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1866 1881 +15
infra 1502 1522 +20
ml 2038 2039 +1
securitySolution 5814 5829 +15
total +51

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
@kbn/ml-embeddables - 6 +6
@kbn/ml-locator - 31 +31
@kbn/ml-ui-actions 18 20 +2
ml 67 55 -12
total +27

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
@kbn/ml-locator - 2 +2

Async chunks

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

id before after diff
apm 3.4MB 3.4MB +3.2KB
infra 1.6MB 1.6MB +30.0B
ml 4.6MB 4.5MB -59.5KB
securitySolution 20.4MB 20.4MB +15.8KB
total -40.5KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/ml-locator - 4 +4
ml 102 101 -1
total +3

Page load bundle

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

id before after diff
ml 76.0KB 74.3KB -1.7KB
Unknown metric groups

API count

id before after diff
@kbn/ml-embeddables - 6 +6
@kbn/ml-locator - 33 +33
@kbn/ml-ui-actions 18 20 +2
ml 154 141 -13
total +28

async chunk count

id before after diff
ml 110 107 -3

History

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

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

Successfully merging this pull request may close these issues.

3 participants