Skip to content

[8.x] [ML] Move FieldStatsFlyout, parseInterval, validators to packages. (#193657)#193859

Merged
walterra merged 1 commit intoelastic:8.xfrom
walterra:backport/8.x/pr-193657
Sep 24, 2024
Merged

[8.x] [ML] Move FieldStatsFlyout, parseInterval, validators to packages. (#193657)#193859
walterra merged 1 commit intoelastic:8.xfrom
walterra:backport/8.x/pr-193657

Conversation

@walterra
Copy link
Copy Markdown
Contributor

Backport

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

Questions ?

Please refer to the Backport tool documentation

…lastic#193657)

## Summary

Part of elastic#159917.

Moves code from `plugins/ml/common|public` to packages that is used by
transforms too.

While the transforms plugin is maintained by the ML team too, the
transform plugin itself is independently available from the ML UI in the
Kibana management section. We should try to avoid that the transform
plugin is directly depending on the `ml` plugin. This PR moves some code
from `plugins/ml/common|public` to packages so that we can remove `ml`
from the list of `requiredBundles` of the `transform` plugin.

The packages were created with these commands:

```
node scripts/generate package @kbn/ml-field-stats-flyout --dir ./x-pack/packages/ml/field_stats_flyout
node scripts/generate package @kbn/ml-parse-interval --dir ./x-pack/packages/ml/parse_interval
node scripts/generate package @kbn/ml-validators --dir ./x-pack/packages/ml/validators
```

The following commands were used to check missing jsdoc comments and
exports:

```
node scripts/build_api_docs --plugin @kbn/ml-field-stats-flyout --stats comments
node scripts/build_api_docs --plugin @kbn/ml-field-stats-flyout --stats exports
node scripts/build_api_docs --plugin @kbn/ml-parse-interval  --stats comments
node scripts/build_api_docs --plugin @kbn/ml-parse-interval  --stats exports
node scripts/build_api_docs --plugin @kbn/ml-validators --stats comments
node scripts/build_api_docs --plugin @kbn/ml-validators --stats exports
```

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit b2d85d5)

# Conflicts:
#	.github/CODEOWNERS
@walterra walterra added the backport This PR is a backport of another PR label Sep 24, 2024
@walterra walterra enabled auto-merge (squash) September 24, 2024 12:23
@walterra walterra self-assigned this Sep 24, 2024
@kibana-ci
Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
ml 2038 2039 +1
transform 440 510 +70
total +71

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
ml 67 63 -4

Async chunks

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

id before after diff
ml 4.6MB 4.6MB -12.9KB
transform 549.6KB 585.4KB +35.8KB
total +22.9KB

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
ml 102 100 -2

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.2KB -1.9KB
transform 18.7KB 18.5KB -156.0B
total -2.0KB
Unknown metric groups

API count

id before after diff
@kbn/ml-field-stats-flyout - 29 +29
@kbn/ml-parse-interval - 3 +3
@kbn/ml-validators - 32 +32
ml 154 148 -6
total +58

async chunk count

id before after diff
ml 110 109 -1
transform 3 6 +3
total +2

ESLint disabled line counts

id before after diff
@kbn/ml-field-stats-flyout - 4 +4
ml 566 562 -4
total -0

Total ESLint disabled count

id before after diff
@kbn/ml-field-stats-flyout - 4 +4
ml 569 565 -4
total -0

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

cc @walterra

@walterra walterra merged commit bc2bb0d into elastic:8.x Sep 24, 2024
@walterra walterra deleted the backport/8.x/pr-193657 branch September 24, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants