Skip to content

[Fleet] Adding ML module asset type#94950

Merged
jgowdyelastic merged 8 commits intoelastic:masterfrom
jgowdyelastic:adding-ml-module-asset-type-to-fleet
Mar 29, 2021
Merged

[Fleet] Adding ML module asset type#94950
jgowdyelastic merged 8 commits intoelastic:masterfrom
jgowdyelastic:adding-ml-module-asset-type-to-fleet

Conversation

@jgowdyelastic
Copy link
Copy Markdown
Member

@jgowdyelastic jgowdyelastic commented Mar 18, 2021

Adds support for ML module asset type.

Related to elastic/package-spec#152

@jgowdyelastic jgowdyelastic marked this pull request as ready for review March 23, 2021 12:08
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner March 23, 2021 12:08
@jgowdyelastic jgowdyelastic self-assigned this Mar 23, 2021
@jgowdyelastic jgowdyelastic added :ml enhancement New value added to drive a business result Feature:Fleet Fleet team's agent central management project release_note:enhancement review v7.13.0 v8.0.0 labels Mar 23, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Feature:Fleet)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

@jgowdyelastic
Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Mar 23, 2021
Copy link
Copy Markdown
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM 🚀

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Mar 24, 2021

It would be good to have a test that installs and removes a package with an ml module to make sure it works as expected. @skh might be able to give some guidance here on how to do this best?

@skh
Copy link
Copy Markdown
Contributor

skh commented Mar 24, 2021

It would be good to have a test that installs and removes a package with an ml module to make sure it works as expected. @skh might be able to give some guidance here on how to do this best?

#88189 is the PR where we added the lens asset type, and 1c7c7e2 is the commit where the corresponding API integration test is added. I believe for this change the test would look very similar.

@jgowdyelastic
Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@jgowdyelastic
Copy link
Copy Markdown
Member Author

It would be good to have a test that installs and removes a package with an ml module to make sure it works as expected. @skh might be able to give some guidance here on how to do this best?

@ruflin tests added

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Mar 29, 2021

@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @jgowdyelastic Would be good to follow up with an ml module in the integration packages so we can test this in real world.

@EricDavisX Would be nice if this could also be tested manually like install / remove as soon as we have it in a package.

@jen-huang Could you have one more look to make sure this looks as it should?

@jgowdyelastic
Copy link
Copy Markdown
Member Author

@ruflin thank you.
@peteharverson has already begun some end to end tests of this. Using an nginx dataset and a WIP nginx module.

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
fleet 716.3KB 716.4KB +22.0B

Page load bundle

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

id before after diff
fleet 344.4KB 344.5KB +80.0B

History

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

cc @jgowdyelastic

@ruflin
Copy link
Copy Markdown
Contributor

ruflin commented Mar 29, 2021

Great to hear @jgowdyelastic . @EricDavisX I think that means you can remove it from your list, sorry for the noise.

Lets get the PR merged then!

@jgowdyelastic jgowdyelastic added the auto-backport Deprecated - use backport:version if exact versions are needed label Mar 29, 2021
@jgowdyelastic jgowdyelastic merged commit 478ad3b into elastic:master Mar 29, 2021
@jgowdyelastic jgowdyelastic deleted the adding-ml-module-asset-type-to-fleet branch March 29, 2021 15:21
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Mar 29, 2021
* [Fleet] Adding ML module asset type

* adding test

* guessing asset ids

* better guess at IDs

* renaming asset ids

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

7.x / #95665

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Mar 29, 2021
* [Fleet] Adding ML module asset type

* adding test

* guessing asset ids

* better guess at IDs

* renaming asset ids

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: James Gowdy <jgowdy@elastic.co>
{ id: '47758dc2-979d-5fbe-a2bd-9eded68a5a43', type: 'epm-packages-assets' },
{ id: '318959c9-997b-5a14-b328-9fc7355b4b74', type: 'epm-packages-assets' },
{ id: 'e21b59b5-eb76-5ab0-bef2-1c8e379e6197', type: 'epm-packages-assets' },
{ id: '4c758d70-ecf1-56b3-b704-6d8374841b34', type: 'epm-packages-assets' },
Copy link
Copy Markdown
Contributor

@rw-access rw-access Mar 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @jgowdyelastic, I'm working on a similar PR #95885 for security_rule assets. how'd you get these UUIDs? I looked through your commits and couldn't reverse engineer your process

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rw-access It took me quite a while to work this out, after adding lots of log statements in fleet I found the best way is to run the tests locally and then copy the IDs out of the errors.
They need to be in the correct order, which again I determined from the test errors.
I'm happy to help if this doesn't work for you.

You need to follow the steps here to run the tests:
https://github.com/elastic/kibana/blob/master/x-pack/plugins/fleet/README.md#tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed enhancement New value added to drive a business result Feature:Fleet Fleet team's agent central management project :ml release_note:enhancement review Team:Fleet Team label for Observability Data Collection Fleet team v7.13.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants