Skip to content

[ML] Fix schema definition for the module endpoint #191633

Merged
darnautov merged 2 commits intoelastic:mainfrom
darnautov:ml-fix-defaultIndexPattern
Aug 30, 2024
Merged

[ML] Fix schema definition for the module endpoint #191633
darnautov merged 2 commits intoelastic:mainfrom
darnautov:ml-fix-defaultIndexPattern

Conversation

@darnautov
Copy link
Copy Markdown
Contributor

@darnautov darnautov commented Aug 28, 2024

Summary

Fixes an issue introduced in #190840 where the module endpoint had a wrong type definition for response validation, causing the Rules page in Security plugin to crash.

@darnautov darnautov added :ml release_note:skip Skip the PR/issue when compiling release notes Team:ML Team label for ML (also use :ml) t// v8.16.0 labels Aug 28, 2024
@darnautov darnautov self-assigned this Aug 28, 2024
@darnautov darnautov requested a review from a team as a code owner August 28, 2024 13:37
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

query: schema.maybe(schema.any()),
jobs: schema.arrayOf(schema.any()),
datafeeds: schema.arrayOf(schema.any()),
kibana: schema.any(),
Copy link
Copy Markdown
Contributor

@alvarezmelissa87 alvarezmelissa87 Aug 28, 2024

Choose a reason for hiding this comment

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

I believe kibana can also be missing so should be wrapped in schema.maybe(... - this is also required for the endpoint to work when not passing args and just getting the modules list.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in e0913ca

Copy link
Copy Markdown
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

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

@darnautov Thanks for fixing the issue 👍

I tested Rule Management table and the issue introduced by #190840 is fixed.

@kibana-ci
Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

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

cc @darnautov

Copy link
Copy Markdown
Contributor

@peteharverson peteharverson 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

@darnautov darnautov merged commit ca594f3 into elastic:main Aug 30, 2024
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Aug 30, 2024
@darnautov darnautov deleted the ml-fix-defaultIndexPattern branch August 30, 2024 07:47
alvarezmelissa87 added a commit that referenced this pull request Sep 12, 2024
…r Supplied configurations (ML Modules) (#191564)

## Summary

This PR adds a page in the UI for 'Supplied configurations'
Dependent on this fix to the endpoint schema going in first:
#191633

NOTE: This item will be added to the side-nav of oblt serverless once
this update is in: #190458

Adds dedicated UI page for preconfigured job packages - subitem of the
Anomaly Detection navigation:
<img width="1721" alt="image"
src="https://github.com/user-attachments/assets/194bbf44-aa7c-4afa-94e3-587fb9e5f601">

When they can't be run in the ML UI: 
<img width="1467" alt="image"
src="https://github.com/user-attachments/assets/487463e8-7520-48de-8806-1d45a82e452e">

When selected - flyout opens to reveal package assets:
<img width="1098" alt="image"
src="https://github.com/user-attachments/assets/a648a6d8-df79-4bb3-a797-61f02e246c9b">

Clicking the `Run data recognizer` button shows matching data views (if
any) with link to job creation:
<img width="1099" alt="image"
src="https://github.com/user-attachments/assets/05e9f7f7-e41f-486d-ba41-84cacf534cd0">

Empty table when no matching dataviews are found:
<img width="999" alt="image"
src="https://github.com/user-attachments/assets/d8bbf3be-7035-4e2f-956e-83dfbc26b247">

Jobs tab of flyout:
<img width="1102" alt="image"
src="https://github.com/user-attachments/assets/e94efb2e-1f21-4883-aa2b-2c42db5be970">

kibana tab of flyout:
<img width="1100" alt="image"
src="https://github.com/user-attachments/assets/0021a527-8d9d-4e06-9fae-d832015f7f7d">




### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting :ml release_note:skip Skip the PR/issue when compiling release notes Team:ML Team label for ML (also use :ml) t// v8.16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants