Commit 4adb65c
## Summary
Part of #237808 and #189755.
Related to #197967.
- This PR moves ML type definitions from the ML plugin
(`plugins/ml/common/types/*`) to a new package `@kbn/ml-common-types`.
This refactoring is part of a larger effort to remove loading async
bundles on page loads.
- This means for solutions importing this code will now import from
`@kbn/ml-common-types/...` instead of `@kbn/ml-plugin/...`.
- Some barrel files/export (`export * from ...`) were removed and
replaced with deep imports to reduce the risk of running into circular
dependencies and bundle size explosion.
- Some consts (or our variants of enums with `as const`) were moved to
this package to avoid future circular dependency risk regarding the
upcoming `@kbn/ml-common-constants` package.
- Moves API schemas to a new `ml-server-schemas` package. This is a
`shared-server` package, meaning that any `common` and `public`
packages/plugins can import types from it, but no runtime code. It's
convenient to expose types from the schemas, so I had to make
`ml-common-types` depend on this new package.
Review hint for teams being triggered for code owners review: Sorry this
touches a lot of files but code touched outside the scope of ML should
be just updated imports.
### Checklist
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Robert Jaszczurek <robert.jaszczurek@elastic.co>
Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
1 parent 47ab5bc commit 4adb65c
651 files changed
Lines changed: 1735 additions & 1463 deletions
File tree
- .github
- x-pack
- platform
- packages
- private/ml/data_frame_analytics_utils
- src
- test
- accessibility/apps/group3
- alerting_api_integration/spaces_only/tests/alerting/group2/ml_rule_types/anomaly_detection
- api_integration
- apis/ml
- annotations
- data_frame_analytics
- filters
- jobs
- model_management
- notifications
- results
- saved_objects
- system
- services/ml
- functional_with_es_ssl/apps/discover_ml/ml
- functional
- apps
- aiops
- cases_attachments/ml
- ml
- anomaly_detection_integrations
- anomaly_detection_jobs
- group1
- group3
- anomaly_detection_result_views
- data_frame_analytics/group1
- stack_management_jobs
- services/ml
- screenshot_creation/apps/ml_docs
- anomaly_detection
- data_frame_analytics
- solutions
- observability/plugins/uptime
- public/legacy_uptime
- components/monitor
- ml
- monitor_duration
- state
- actions
- api
- reducers
- search/plugins/enterprise_search
- public/applications/enterprise_search_content
- __mocks__
- components/search_index/pipelines/ml_inference
- security
- packages/kbn-evals-suite-entity-analytics
- src
- plugins/security_solution
- common/machine_learning
- public
- common
- components
- ml_popover
- hooks
- ml
- api
- hooks
- permissions
- containers/anomalies/anomalies_query_tab_body
- detection_engine
- rule_creation/components
- ml_audit_icon
- ml_job_status_badge
- ml_jobs_description
- admin
- user
- rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_ml_jobs_upgrade_modal
- entity_analytics/components/ea_ml_job_callout
- server/agent_builder/skills/find_security_ml_jobs/inline_tools/find_security_ml_jobs
- test/security_solution_cypress/cypress
- tasks
- api_calls
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
| 1048 | + | |
1048 | 1049 | | |
1049 | 1050 | | |
1050 | 1051 | | |
1051 | 1052 | | |
| 1053 | + | |
1052 | 1054 | | |
1053 | 1055 | | |
1054 | 1056 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
| 825 | + | |
825 | 826 | | |
826 | 827 | | |
827 | 828 | | |
| |||
843 | 844 | | |
844 | 845 | | |
845 | 846 | | |
| 847 | + | |
846 | 848 | | |
847 | 849 | | |
848 | 850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1618 | 1618 | | |
1619 | 1619 | | |
1620 | 1620 | | |
| 1621 | + | |
| 1622 | + | |
1621 | 1623 | | |
1622 | 1624 | | |
1623 | 1625 | | |
| |||
1660 | 1662 | | |
1661 | 1663 | | |
1662 | 1664 | | |
| 1665 | + | |
| 1666 | + | |
1663 | 1667 | | |
1664 | 1668 | | |
1665 | 1669 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments