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] Add ML plugin contract mocks #96265

Merged
merged 8 commits into from
Apr 8, 2021
Merged

[ML] Add ML plugin contract mocks #96265

merged 8 commits into from
Apr 8, 2021

Conversation

qn895
Copy link
Member

@qn895 qn895 commented Apr 5, 2021

Summary

This PR addresses #66603 by adding jest mocks for ML plugins (both public and server API). It also replaces mlServicesMock for security solutions from #65583 with the new mock.

Checklist

@qn895 qn895 self-assigned this Apr 5, 2021
@qn895 qn895 added :ml release_note:skip Skip the PR/issue when compiling release notes v7.13.0 v8.0.0 labels Apr 5, 2021
@qn895 qn895 requested review from rylnd and darnautov April 5, 2021 22:02
@qn895
Copy link
Member Author

qn895 commented Apr 6, 2021

@elasticmachine merge upstream

@qn895 qn895 marked this pull request as ready for review April 6, 2021 15:57
@qn895 qn895 requested review from a team as code owners April 6, 2021 15:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

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

Changes look great, happy to get this code into the right plugin 😉 . The existing mocks certainly serve our immediate needs, but we'll reach out (likely with a PR) if/when that changes!

@@ -5,25 +5,9 @@
* 2.0.
*/

import { MlPluginSetup } from '../../../../ml/server';
import { elasticsearchServiceMock } from '../../../../../../src/core/server/mocks';
import { mlPluginServerMock } from '../../../../ml/server/mocks';
Copy link
Contributor

Choose a reason for hiding this comment

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

I think kibana preference is to import these mocks directly in the consuming tests, but this makes sense to keep changes here to a minimum 👍 We (SecSol) can absolutely do this in a followup PR.

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@qn895
Copy link
Member Author

qn895 commented Apr 7, 2021

@elasticmachine merge upstream

@qn895 qn895 added the auto-backport Deprecated - use backport:version if exact versions are needed label Apr 7, 2021
@qn895
Copy link
Member Author

qn895 commented Apr 7, 2021

@elasticmachine merge upstream

@darnautov
Copy link
Contributor

@elasticmachine merge upstream

@qn895
Copy link
Member Author

qn895 commented Apr 8, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @qn895

@qn895 qn895 merged commit 955c46b into elastic:master Apr 8, 2021
@qn895 qn895 deleted the ml-mocks branch April 8, 2021 17:15
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Apr 8, 2021
@kibanamachine
Copy link
Contributor

💚 Backport successful

7.x / #96610

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Apr 8, 2021
Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Quynh Nguyen <[email protected]>
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 :ml release_note:skip Skip the PR/issue when compiling release notes v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants