You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #237808 and #189755.
Related to #197967.
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.@kbn/ml-common-types/...instead of@kbn/ml-plugin/....export * from ...) were removed and replaced with deep imports to reduce the risk of running into circular dependencies and bundle size explosion.as const) were moved to this package to avoid future circular dependency risk regarding the upcoming@kbn/ml-common-constantspackage.ml-server-schemaspackage. This is ashared-serverpackage, meaning that anycommonandpublicpackages/plugins can import types from it, but no runtime code. It's convenient to expose types from the schemas, so I had to makeml-common-typesdepend 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
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.