Commit graph

2193 commits

Author SHA1 Message Date
Lisa Cawley
62977ff0bb
[8.11] [OAS] Migrate machine learning APIs to v3.1.0 (#171594) (#171889)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[OAS] Migrate machine learning APIs to v3.1.0
(#171594)](https://github.com/elastic/kibana/pull/171594)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-11-23T19:46:05Z","message":"[OAS]
Migrate machine learning APIs to v3.1.0
(#171594)","sha":"2f258a229c702fa10a58cbcf7baec7917d64c83c","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","docs","backport:prev-minor","v8.12.0"],"number":171594,"url":"https://github.com/elastic/kibana/pull/171594","mergeCommit":{"message":"[OAS]
Migrate machine learning APIs to v3.1.0
(#171594)","sha":"2f258a229c702fa10a58cbcf7baec7917d64c83c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/171594","number":171594,"mergeCommit":{"message":"[OAS]
Migrate machine learning APIs to v3.1.0
(#171594)","sha":"2f258a229c702fa10a58cbcf7baec7917d64c83c"}}]}]
BACKPORT-->
2023-11-23 14:42:19 -07:00
Kibana Machine
ab76b27933
[8.11] [ML] Fixing blocked jobs polling interval (#171878) (#171885)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] Fixing blocked jobs polling interval
(#171878)](https://github.com/elastic/kibana/pull/171878)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2023-11-23T17:56:19Z","message":"[ML]
Fixing blocked jobs polling interval (#171878)\n\nThere is a bug with
the way we check whether or not to start polling for\r\nblocked jobs. We
should only start polling there isn't an existing
poll\r\nrunning.\r\nThis causes the polling to run as possible and to
refresh the full jobs\r\nlist on every check.\r\nNow the blocked jobs
polling correctly runs at the interval of 2s and\r\nthe full jobs list
is only updated when there is a change in the list of\r\nblocked
jobs.\r\n\r\nPartially fixes
https://github.com/elastic/kibana/issues/171626\r\n\r\nA more in-depth
change as specified in the issue can be done in follow\r\nup work. It's
good to get this change in for the next release just in\r\ncase we run
out of time for the larger
change.","sha":"e7c793e0d74f2c48c788e7daf37dfc3b7cd68c9f","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly
Detection","v8.12.0","v8.11.2"],"number":171878,"url":"https://github.com/elastic/kibana/pull/171878","mergeCommit":{"message":"[ML]
Fixing blocked jobs polling interval (#171878)\n\nThere is a bug with
the way we check whether or not to start polling for\r\nblocked jobs. We
should only start polling there isn't an existing
poll\r\nrunning.\r\nThis causes the polling to run as possible and to
refresh the full jobs\r\nlist on every check.\r\nNow the blocked jobs
polling correctly runs at the interval of 2s and\r\nthe full jobs list
is only updated when there is a change in the list of\r\nblocked
jobs.\r\n\r\nPartially fixes
https://github.com/elastic/kibana/issues/171626\r\n\r\nA more in-depth
change as specified in the issue can be done in follow\r\nup work. It's
good to get this change in for the next release just in\r\ncase we run
out of time for the larger
change.","sha":"e7c793e0d74f2c48c788e7daf37dfc3b7cd68c9f"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/171878","number":171878,"mergeCommit":{"message":"[ML]
Fixing blocked jobs polling interval (#171878)\n\nThere is a bug with
the way we check whether or not to start polling for\r\nblocked jobs. We
should only start polling there isn't an existing
poll\r\nrunning.\r\nThis causes the polling to run as possible and to
refresh the full jobs\r\nlist on every check.\r\nNow the blocked jobs
polling correctly runs at the interval of 2s and\r\nthe full jobs list
is only updated when there is a change in the list of\r\nblocked
jobs.\r\n\r\nPartially fixes
https://github.com/elastic/kibana/issues/171626\r\n\r\nA more in-depth
change as specified in the issue can be done in follow\r\nup work. It's
good to get this change in for the next release just in\r\ncase we run
out of time for the larger
change.","sha":"e7c793e0d74f2c48c788e7daf37dfc3b7cd68c9f"}},{"branch":"8.11","label":"v8.11.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <jgowdy@elastic.co>
2023-11-23 12:04:55 -07:00
Kibana Machine
dbf07605ac
[8.11] Always throw error objects - never strings (#171498) (#171547)
# Backport

This will backport the following commits from `main` to `8.11`:
- [Always throw error objects - never strings
(#171498)](https://github.com/elastic/kibana/pull/171498)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Thomas
Watson","email":"watson@elastic.co"},"sourceCommit":{"committedDate":"2023-11-20T14:23:16Z","message":"Always
throw error objects - never strings
(#171498)","sha":"4f9094caf3cc4781137b7cfccbe2e1858f4f39c0","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v8.12.0"],"number":171498,"url":"https://github.com/elastic/kibana/pull/171498","mergeCommit":{"message":"Always
throw error objects - never strings
(#171498)","sha":"4f9094caf3cc4781137b7cfccbe2e1858f4f39c0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/171498","number":171498,"mergeCommit":{"message":"Always
throw error objects - never strings
(#171498)","sha":"4f9094caf3cc4781137b7cfccbe2e1858f4f39c0"}}]}]
BACKPORT-->

Co-authored-by: Thomas Watson <watson@elastic.co>
2023-11-20 08:59:59 -07:00
Kibana Machine
f0a4ac01b5
[8.11] [ML] Disable anomaly detection job creation from ES|QL lens visualizations (#170711) (#170835)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] Disable anomaly detection job creation from ES|QL lens
visualizations (#170711)](https://github.com/elastic/kibana/pull/170711)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"jgowdy@elastic.co"},"sourceCommit":{"committedDate":"2023-11-08T09:37:10Z","message":"[ML]
Disable anomaly detection job creation from ES|QL lens visualizations
(#170711)\n\nFixes
https://github.com/elastic/kibana/issues/170670\r\n\r\nWe currently do
not support ES|QL in anomaly detection jobs.\r\n\r\nAn ES|QL Lens vis
cannot have mixed layers, as in one layer using ES|QL\r\nand another
using DSL, therefore we need to completely disable the ML\r\naction item
in the menu.\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c1681c8d49304f324895acbe73323ffacad3fcbc","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly
Detection","v8.12.0","v8.11.1"],"number":170711,"url":"https://github.com/elastic/kibana/pull/170711","mergeCommit":{"message":"[ML]
Disable anomaly detection job creation from ES|QL lens visualizations
(#170711)\n\nFixes
https://github.com/elastic/kibana/issues/170670\r\n\r\nWe currently do
not support ES|QL in anomaly detection jobs.\r\n\r\nAn ES|QL Lens vis
cannot have mixed layers, as in one layer using ES|QL\r\nand another
using DSL, therefore we need to completely disable the ML\r\naction item
in the menu.\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c1681c8d49304f324895acbe73323ffacad3fcbc"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/170711","number":170711,"mergeCommit":{"message":"[ML]
Disable anomaly detection job creation from ES|QL lens visualizations
(#170711)\n\nFixes
https://github.com/elastic/kibana/issues/170670\r\n\r\nWe currently do
not support ES|QL in anomaly detection jobs.\r\n\r\nAn ES|QL Lens vis
cannot have mixed layers, as in one layer using ES|QL\r\nand another
using DSL, therefore we need to completely disable the ML\r\naction item
in the menu.\r\n\r\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"c1681c8d49304f324895acbe73323ffacad3fcbc"}},{"branch":"8.11","label":"v8.11.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <jgowdy@elastic.co>
2023-11-08 03:55:12 -07:00
James Rodewig
1b00859969
[8.11] Update UI copy for tech preview (#170143) (#170534)
# Backport

This will backport the following commits from `main` to `8.11`:
- [Update UI copy for `tech preview`
(#170143)](https://github.com/elastic/kibana/pull/170143)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"James
Rodewig","email":"james.rodewig@elastic.co"},"sourceCommit":{"committedDate":"2023-11-02T20:48:53Z","message":"Update
UI copy for `tech preview`
(#170143)","sha":"0997cb25238f812a3eff67733bb16ef1521abea4","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","Team:APM","release_note:skip","Team:Fleet","v8.12.0","v8.11.1","v8.10.5"],"number":170143,"url":"https://github.com/elastic/kibana/pull/170143","mergeCommit":{"message":"Update
UI copy for `tech preview`
(#170143)","sha":"0997cb25238f812a3eff67733bb16ef1521abea4"}},"sourceBranch":"main","suggestedTargetBranches":["8.11","8.10"],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/170143","number":170143,"mergeCommit":{"message":"Update
UI copy for `tech preview`
(#170143)","sha":"0997cb25238f812a3eff67733bb16ef1521abea4"}},{"branch":"8.11","label":"v8.11.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.10","label":"v8.10.5","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2023-11-03 10:02:09 -07:00
Lisa Cawley
9829476388
[8.11] [OAS] Simplify server declaration in ML APIs (#169885) (#169988)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[OAS] Simplify server declaration in ML APIs
(#169885)](https://github.com/elastic/kibana/pull/169885)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-10-26T20:45:47Z","message":"[OAS]
Simplify server declaration in ML APIs
(#169885)","sha":"8924218d6ad5cb0c96f7ac7fe08d8f5a97fa2e48","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","docs","backport:prev-minor","v8.12.0"],"number":169885,"url":"https://github.com/elastic/kibana/pull/169885","mergeCommit":{"message":"[OAS]
Simplify server declaration in ML APIs
(#169885)","sha":"8924218d6ad5cb0c96f7ac7fe08d8f5a97fa2e48"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/169885","number":169885,"mergeCommit":{"message":"[OAS]
Simplify server declaration in ML APIs
(#169885)","sha":"8924218d6ad5cb0c96f7ac7fe08d8f5a97fa2e48"}}]}]
BACKPORT-->
2023-10-27 09:37:10 +02:00
Kibana Machine
0c0c1777f7
[8.11] [ML] Fix the model state column in the Trained Models UI (#169068) (#169086)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] Fix the model state column in the Trained Models UI
(#169068)](https://github.com/elastic/kibana/pull/169068)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"dmitrii.arnautov@elastic.co"},"sourceCommit":{"committedDate":"2023-10-17T11:02:30Z","message":"[ML]
Fix the model state column in the Trained Models UI (#169068)\n\n##
Summary\r\n\r\nFixes an issue when the `Ready to deploy` download state
was overriding\r\nthe `starting` and `stopping` deployment
states.","sha":"3164eca0dc8ef4f5201f79d29d330488013e98d9","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","Team:ML","v8.11.0","v8.12.0"],"number":169068,"url":"https://github.com/elastic/kibana/pull/169068","mergeCommit":{"message":"[ML]
Fix the model state column in the Trained Models UI (#169068)\n\n##
Summary\r\n\r\nFixes an issue when the `Ready to deploy` download state
was overriding\r\nthe `starting` and `stopping` deployment
states.","sha":"3164eca0dc8ef4f5201f79d29d330488013e98d9"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/169068","number":169068,"mergeCommit":{"message":"[ML]
Fix the model state column in the Trained Models UI (#169068)\n\n##
Summary\r\n\r\nFixes an issue when the `Ready to deploy` download state
was overriding\r\nthe `starting` and `stopping` deployment
states.","sha":"3164eca0dc8ef4f5201f79d29d330488013e98d9"}}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2023-10-17 05:25:18 -07:00
Kibana Machine
7f8909a49a
[8.11] Fix ML swimlane embeddable titles (#168647) (#168846)
# Backport

This will backport the following commits from `main` to `8.11`:
- [Fix ML swimlane embeddable titles
(#168647)](https://github.com/elastic/kibana/pull/168647)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Devon
Thomson","email":"devon.thomson@elastic.co"},"sourceCommit":{"committedDate":"2023-10-13T13:28:57Z","message":"Fix
ML swimlane embeddable titles (#168647)\n\nStops the ML Embeddables from
setting the default title and default description on their outputs
during
initialization.","sha":"7cb153d4d7344212c437553655d980b02b4b355b","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Embedding",":ml","Feature:Anomaly
Detection","Team:Presentation","loe:small","release_note:skip","impact:medium","v8.11.0","v8.12.0"],"number":168647,"url":"https://github.com/elastic/kibana/pull/168647","mergeCommit":{"message":"Fix
ML swimlane embeddable titles (#168647)\n\nStops the ML Embeddables from
setting the default title and default description on their outputs
during
initialization.","sha":"7cb153d4d7344212c437553655d980b02b4b355b"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168647","number":168647,"mergeCommit":{"message":"Fix
ML swimlane embeddable titles (#168647)\n\nStops the ML Embeddables from
setting the default title and default description on their outputs
during
initialization.","sha":"7cb153d4d7344212c437553655d980b02b4b355b"}}]}]
BACKPORT-->

Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
2023-10-13 08:04:11 -07:00
Kibana Machine
f611a41a8a
[8.11] [ML] Add functional tests for Data Drift view (#167911) (#168756)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] Add functional tests for Data Drift view
(#167911)](https://github.com/elastic/kibana/pull/167911)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Quynh Nguyen
(Quinn)","email":"43350163+qn895@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-10-12T22:52:25Z","message":"[ML]
Add functional tests for Data Drift view (#167911)\n\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"f28349faf19d78bb679918297742a0bf7cb064f5","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","test_ui_functional","release_note:skip","v8.11.0","v8.12.0","v8.11.1"],"number":167911,"url":"https://github.com/elastic/kibana/pull/167911","mergeCommit":{"message":"[ML]
Add functional tests for Data Drift view (#167911)\n\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"f28349faf19d78bb679918297742a0bf7cb064f5"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/167911","number":167911,"mergeCommit":{"message":"[ML]
Add functional tests for Data Drift view (#167911)\n\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"f28349faf19d78bb679918297742a0bf7cb064f5"}}]}]
BACKPORT-->

Co-authored-by: Quynh Nguyen (Quinn) <43350163+qn895@users.noreply.github.com>
2023-10-12 17:03:17 -07:00
Kibana Machine
abb04cd107
[8.11] [ML] API integration tests for start and stop model deployment (#168460) (#168513)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] API integration tests for start and stop model deployment
(#168460)](https://github.com/elastic/kibana/pull/168460)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"dmitrii.arnautov@elastic.co"},"sourceCommit":{"committedDate":"2023-10-10T16:59:33Z","message":"[ML]
API integration tests for start and stop model deployment
(#168460)\n\n## Summary\r\n\r\nPart of #164562\r\n\r\nAdds API
integration tests for `_start` and `_stop` trained
model\r\ndeployment.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"9ba0e710a545ae3bb6f54303a5989619ea8f64ee","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","test-api-integration","Team:ML","v8.11.0","v8.12.0"],"number":168460,"url":"https://github.com/elastic/kibana/pull/168460","mergeCommit":{"message":"[ML]
API integration tests for start and stop model deployment
(#168460)\n\n## Summary\r\n\r\nPart of #164562\r\n\r\nAdds API
integration tests for `_start` and `_stop` trained
model\r\ndeployment.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"9ba0e710a545ae3bb6f54303a5989619ea8f64ee"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168460","number":168460,"mergeCommit":{"message":"[ML]
API integration tests for start and stop model deployment
(#168460)\n\n## Summary\r\n\r\nPart of #164562\r\n\r\nAdds API
integration tests for `_start` and `_stop` trained
model\r\ndeployment.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"9ba0e710a545ae3bb6f54303a5989619ea8f64ee"}}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2023-10-10 11:30:09 -07:00
Kibana Machine
f24b05656c
[8.11] [ML] Remove the Tech Preview label from ELSER v2 (#168192) (#168283)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] Remove the Tech Preview label from ELSER v2
(#168192)](https://github.com/elastic/kibana/pull/168192)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"dmitrii.arnautov@elastic.co"},"sourceCommit":{"committedDate":"2023-10-06T18:00:05Z","message":"[ML]
Remove the Tech Preview label from ELSER v2 (#168192)\n\n##
Summary\r\n\r\nRemoves the Tech Preview label from ELSER v2 models.
\r\n\r\n### Checklist\r\n\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"0636610217d570608eaf7cbfc06432a5b581d497","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":[":ml","release_note:skip","Team:ML","v8.11.0","v8.12.0"],"number":168192,"url":"https://github.com/elastic/kibana/pull/168192","mergeCommit":{"message":"[ML]
Remove the Tech Preview label from ELSER v2 (#168192)\n\n##
Summary\r\n\r\nRemoves the Tech Preview label from ELSER v2 models.
\r\n\r\n### Checklist\r\n\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"0636610217d570608eaf7cbfc06432a5b581d497"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168192","number":168192,"mergeCommit":{"message":"[ML]
Remove the Tech Preview label from ELSER v2 (#168192)\n\n##
Summary\r\n\r\nRemoves the Tech Preview label from ELSER v2 models.
\r\n\r\n### Checklist\r\n\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"0636610217d570608eaf7cbfc06432a5b581d497"}}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2023-10-06 12:10:42 -07:00
Kibana Machine
77d129a155
[8.11] [ML] Fix Anomaly charts embeddable fails to load if partition value is empty string (#167827) (#168273)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] Fix Anomaly charts embeddable fails to load if partition value
is empty string
(#167827)](https://github.com/elastic/kibana/pull/167827)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Quynh Nguyen
(Quinn)","email":"43350163+qn895@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-10-06T16:49:32Z","message":"[ML]
Fix Anomaly charts embeddable fails to load if partition value is empty
string (#167827)\n\n## Summary\r\n\r\nFix
https://github.com/elastic/kibana/issues/165847. This PR
fixes\r\nAnomaly charts embeddable failing to load if partition value is
an empty\r\nstring. This bug is caused by invalid kuery string when a
field value is\r\nempty.\r\n\r\nPreviously, embeddable input was
receiving the following kql query\r\n`{exampleFieldName}:` if the value
is empty. The fix in this PR makes it\r\nso it's
`{exampleFieldName}:\"\"`. So a new
function\r\ngetEscapedKueryForSelectionInfluencer is added for this
specific\r\nscenario.\r\n\r\nMaking a new function here instead of
updating\r\n`escapeKueryForFieldValuePair` because all the other usages
of that\r\nfunction are related to opening a URL so it requires a
special escape.\r\n\r\n###
After:\r\n\r\n\r\nf09b207f-1c4c-42a5-aaea-dad50512676c\r\n\r\n\r\n\r\n\r\n###
Steps to reproduce:\r\n\r\n- In a data view, create a new runtime field.
For this runtime field,\r\nset to `keyword` type, and use following
script to mimic having an empty\r\nfield for certain docs.\r\n```\r\ndef
source = doc['ampersand&name'].value;\r\nif (source == \"AWE\")
{\r\n\temit(\"\");\r\n}\r\nelse
{\r\n\temit(doc['ampersand&name'].value);\r\n}\r\n```\r\n- Create an
Anomaly detection using that data view, using the runtime\r\nfield as a
split field or partition field.\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\r\n\r\n- [ ] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ecc9d9f267e6f60509805bfdc01e8eed2858a586","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly
Detection","v8.11.0","v8.12.0"],"number":167827,"url":"https://github.com/elastic/kibana/pull/167827","mergeCommit":{"message":"[ML]
Fix Anomaly charts embeddable fails to load if partition value is empty
string (#167827)\n\n## Summary\r\n\r\nFix
https://github.com/elastic/kibana/issues/165847. This PR
fixes\r\nAnomaly charts embeddable failing to load if partition value is
an empty\r\nstring. This bug is caused by invalid kuery string when a
field value is\r\nempty.\r\n\r\nPreviously, embeddable input was
receiving the following kql query\r\n`{exampleFieldName}:` if the value
is empty. The fix in this PR makes it\r\nso it's
`{exampleFieldName}:\"\"`. So a new
function\r\ngetEscapedKueryForSelectionInfluencer is added for this
specific\r\nscenario.\r\n\r\nMaking a new function here instead of
updating\r\n`escapeKueryForFieldValuePair` because all the other usages
of that\r\nfunction are related to opening a URL so it requires a
special escape.\r\n\r\n###
After:\r\n\r\n\r\nf09b207f-1c4c-42a5-aaea-dad50512676c\r\n\r\n\r\n\r\n\r\n###
Steps to reproduce:\r\n\r\n- In a data view, create a new runtime field.
For this runtime field,\r\nset to `keyword` type, and use following
script to mimic having an empty\r\nfield for certain docs.\r\n```\r\ndef
source = doc['ampersand&name'].value;\r\nif (source == \"AWE\")
{\r\n\temit(\"\");\r\n}\r\nelse
{\r\n\temit(doc['ampersand&name'].value);\r\n}\r\n```\r\n- Create an
Anomaly detection using that data view, using the runtime\r\nfield as a
split field or partition field.\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\r\n\r\n- [ ] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ecc9d9f267e6f60509805bfdc01e8eed2858a586"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/167827","number":167827,"mergeCommit":{"message":"[ML]
Fix Anomaly charts embeddable fails to load if partition value is empty
string (#167827)\n\n## Summary\r\n\r\nFix
https://github.com/elastic/kibana/issues/165847. This PR
fixes\r\nAnomaly charts embeddable failing to load if partition value is
an empty\r\nstring. This bug is caused by invalid kuery string when a
field value is\r\nempty.\r\n\r\nPreviously, embeddable input was
receiving the following kql query\r\n`{exampleFieldName}:` if the value
is empty. The fix in this PR makes it\r\nso it's
`{exampleFieldName}:\"\"`. So a new
function\r\ngetEscapedKueryForSelectionInfluencer is added for this
specific\r\nscenario.\r\n\r\nMaking a new function here instead of
updating\r\n`escapeKueryForFieldValuePair` because all the other usages
of that\r\nfunction are related to opening a URL so it requires a
special escape.\r\n\r\n###
After:\r\n\r\n\r\nf09b207f-1c4c-42a5-aaea-dad50512676c\r\n\r\n\r\n\r\n\r\n###
Steps to reproduce:\r\n\r\n- In a data view, create a new runtime field.
For this runtime field,\r\nset to `keyword` type, and use following
script to mimic having an empty\r\nfield for certain docs.\r\n```\r\ndef
source = doc['ampersand&name'].value;\r\nif (source == \"AWE\")
{\r\n\temit(\"\");\r\n}\r\nelse
{\r\n\temit(doc['ampersand&name'].value);\r\n}\r\n```\r\n- Create an
Anomaly detection using that data view, using the runtime\r\nfield as a
split field or partition field.\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\r\n\r\n- [ ] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[ ] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ecc9d9f267e6f60509805bfdc01e8eed2858a586"}}]}]
BACKPORT-->

Co-authored-by: Quynh Nguyen (Quinn) <43350163+qn895@users.noreply.github.com>
2023-10-06 11:06:29 -07:00
Kibana Machine
948f0082e6
[8.11] [ML] Fix anomaly charts when partition field contains an empty string (#168102) (#168180)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] Fix anomaly charts when partition field contains an empty string
(#168102)](https://github.com/elastic/kibana/pull/168102)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"dmitrii.arnautov@elastic.co"},"sourceCommit":{"committedDate":"2023-10-06T07:49:25Z","message":"[ML]
Fix anomaly charts when partition field contains an empty string
(#168102)\n\n## Summary\r\n\r\nFixes #168067.\r\n\r\nFixes anomaly
charts fetching by replacing logical OR operator with\r\nnullish
coalescing.\r\n\r\n\r\n![image](e8e43c49-507c-4725-9e1a-f412e3bdbe98)\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"efa4e76203a1c20977994559b0e57c09d7751310","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Anomaly
Detection","Team:ML","v8.11.0","v8.12.0"],"number":168102,"url":"https://github.com/elastic/kibana/pull/168102","mergeCommit":{"message":"[ML]
Fix anomaly charts when partition field contains an empty string
(#168102)\n\n## Summary\r\n\r\nFixes #168067.\r\n\r\nFixes anomaly
charts fetching by replacing logical OR operator with\r\nnullish
coalescing.\r\n\r\n\r\n![image](e8e43c49-507c-4725-9e1a-f412e3bdbe98)\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"efa4e76203a1c20977994559b0e57c09d7751310"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168102","number":168102,"mergeCommit":{"message":"[ML]
Fix anomaly charts when partition field contains an empty string
(#168102)\n\n## Summary\r\n\r\nFixes #168067.\r\n\r\nFixes anomaly
charts fetching by replacing logical OR operator with\r\nnullish
coalescing.\r\n\r\n\r\n![image](e8e43c49-507c-4725-9e1a-f412e3bdbe98)\r\n\r\n\r\n###
Checklist\r\n\r\n- [ ] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"efa4e76203a1c20977994559b0e57c09d7751310"}}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2023-10-06 02:06:49 -07:00
Kibana Machine
379cbdaea1
[8.11] [ML] Data Frame analytics outlier detection results: ensure scatterplot matrix adheres to bounding box (#167941) (#168114)
# Backport

This will backport the following commits from `main` to `8.11`:
- [[ML] Data Frame analytics outlier detection results: ensure
scatterplot matrix adheres to bounding box
(#167941)](https://github.com/elastic/kibana/pull/167941)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Melissa
Alvarez","email":"melissa.alvarez@elastic.co"},"sourceCommit":{"committedDate":"2023-10-05T15:02:22Z","message":"[ML]
Data Frame analytics outlier detection results: ensure scatterplot
matrix adheres to bounding box (#167941)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/144709\r\n\r\nEnsures
scatterplot matrix does not over flow bounding box. \r\nThe css already
had an overflow property for 'mlScatterplotMatrix' but\r\nthe class was
never added to the parent div. This PR adds the class to\r\nthe
appropriate div so scatterplot matrix does not overlfow.\r\n\r\n<img
width=\"1102\"
alt=\"image\"\r\nsrc=\"08cbcec2-e1cb-41a4-a570-258071219320\">\r\n\r\n<img
width=\"914\"
alt=\"image\"\r\nsrc=\"ac885ed7-926b-4afe-b270-9b6035d9dc74\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"93b67fe732ec09fcb049b269d0750044161c97d1","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Data
Frame
Analytics","v8.11.0","v8.12.0"],"number":167941,"url":"https://github.com/elastic/kibana/pull/167941","mergeCommit":{"message":"[ML]
Data Frame analytics outlier detection results: ensure scatterplot
matrix adheres to bounding box (#167941)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/144709\r\n\r\nEnsures
scatterplot matrix does not over flow bounding box. \r\nThe css already
had an overflow property for 'mlScatterplotMatrix' but\r\nthe class was
never added to the parent div. This PR adds the class to\r\nthe
appropriate div so scatterplot matrix does not overlfow.\r\n\r\n<img
width=\"1102\"
alt=\"image\"\r\nsrc=\"08cbcec2-e1cb-41a4-a570-258071219320\">\r\n\r\n<img
width=\"914\"
alt=\"image\"\r\nsrc=\"ac885ed7-926b-4afe-b270-9b6035d9dc74\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"93b67fe732ec09fcb049b269d0750044161c97d1"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/167941","number":167941,"mergeCommit":{"message":"[ML]
Data Frame analytics outlier detection results: ensure scatterplot
matrix adheres to bounding box (#167941)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/144709\r\n\r\nEnsures
scatterplot matrix does not over flow bounding box. \r\nThe css already
had an overflow property for 'mlScatterplotMatrix' but\r\nthe class was
never added to the parent div. This PR adds the class to\r\nthe
appropriate div so scatterplot matrix does not overlfow.\r\n\r\n<img
width=\"1102\"
alt=\"image\"\r\nsrc=\"08cbcec2-e1cb-41a4-a570-258071219320\">\r\n\r\n<img
width=\"914\"
alt=\"image\"\r\nsrc=\"ac885ed7-926b-4afe-b270-9b6035d9dc74\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"93b67fe732ec09fcb049b269d0750044161c97d1"}}]}]
BACKPORT-->

Co-authored-by: Melissa Alvarez <melissa.alvarez@elastic.co>
2023-10-05 09:21:40 -07:00
Dima Arnautov
984d5e6daa
[ML] Use release ELSER version (#167888)
## Summary

Updates ELSER model IDs to the release version
2023-10-03 15:19:43 -07:00
Dima Arnautov
e8c0942672
[ML] Update ELSER version for Elastic Assistant (#167522)
## Summary

Update Elastic Assistant to utilize a new version of ELSER.

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
2023-10-03 14:27:27 -07:00
Walter Rafelsberger
43a04a4205
[ML] Transforms: Use delete_dest_index flag instead of ES call to delete destination index. (#166797)
Part of #166796.
Depends on https://github.com/elastic/elasticsearch/pull/99738.

Uses the `delete_dest_index` flag instead of ES call to delete
destination index in the transforms UI when deleting transforms.

The PR also fixes some code related to destination indices for
transforms and data frame analytics. A destination index can be just a
single string. Before the properly typed transform APIs were available
via `estypes`, we accidentally treated destination indices similar to
source indices which might also be arrays of indices.
2023-10-03 17:14:00 +02:00
Dima Arnautov
0c6dfbf209
[ML] ELSER v2 download in the Trained Models UI (#167407)
## Summary

Adds support for ELSER v2 download from the Trained Models UI.

- Marks an appropriate model version for the current cluster
configuration with the recommended flag.
- Updates the state column with better human-readable labels and colour
indicators.
- Adds a callout promoting a new version of ELSER

<img width="1686" alt="image"
src="0deea53a-6d37-4af6-97bc-9f46e36f113b">

#### Notes for reviews
- We need to wait for
https://github.com/elastic/elasticsearch/pull/99584 to get the start
deployment validation functionality. At the moment you can successfully
start deployment of the wrong model version.

### Checklist

- [x] 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
- [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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] 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=
- [x] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2023-10-03 02:19:49 -07:00
James Gowdy
fe7d2eb441
[ML] Initial serverless functional tests for ML (#167493)
Add serverless functional tests for each project.

**Search**
Opens the trained models page and checks that there are 4 models listed.

**Observability**
Creates a AD job and then navigates to the AD jobs list and checks that
the job is listed.

**Security**
Creates a AD job and then navigates to the AD jobs list and checks that
the job is listed.
Creates a DFA job and then navigates to the DFA jobs list and checks
that the job is listed.
Navigates to the trained models page and checks that there are no
trained models listed.

Also adds tests for each project to ensure that kibana search bar only
lists the pages which are enabled.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-03 09:47:18 +01:00
James Gowdy
eddcdbea24
[ML] Catching registration errors after license change (#167622)
We register our cases integration after checking that the license level
is platinum or trial, however if the license changes from platinum ->
basic and then back again, we attempt to register them again. This
throws an error during kibana start up.

To test, change the license level platinum/trial -> basic and then basic
-> platinum.
There will now be a warning the log `ML failed to register cases
persistable state for ml_anomaly_swimlane`

Also updates the AIOPs change point cases registration which also should
only be registered when running with a platinum or trial license.
2023-10-03 01:11:59 -07:00
Ying Mao
3bff7fbf24
[Response Ops][Alerting] Update framework alerts client to write flattened alerts docs (#167691)
Resolves https://github.com/elastic/kibana/issues/166946

## PRs to this feature branch
* https://github.com/elastic/kibana/pull/167439
* https://github.com/elastic/kibana/pull/167583

## Summary

The rule registry has traditionally written out AAD docs with flattened
keys, like

```
{
  "kibana.alert.rule.name": "test"
}
```

The framework alerts client has been writing out AAD docs as objects,
like

```
{
  "kibana": {
    "alert": {
      "rule": {
        "name": "test"
      }
    }
  }
}
```

We've identified a few places where we're updating the docs where having
this divergence makes things more difficult, so this is to switch the
framework to writing flattened alert docs before onboarding more rule
types.

This PR is targeted for 8.11, which is also when we onboarded the index
threshold rule type and the ML anomaly detection rule type to FAAD. For
the ES query rule, which started writing unflattened AaD docs in 8.10,
this PR adds special handling to ensure that those unflattened docs are
correctly updated with flattened fields.

## To Verify

### ES Query and Index Threshold AaD

Create these rules that trigger alerts and verify that their AaD docs
are written out as flattened. For the ES Query rule type, select a
Metrics/Logs consumer and verify that they appear on the O11y alerts
table.

### ML alerts

ML alerts added in https://github.com/elastic/kibana/pull/166349 looked
like:

<details>
  <summary>Unflattened</summary>

```
{
	"kibana": {
		"alert": {
			"url": "/app/ml/explorer/?_g=(ml%3A(jobIds%3A!(rt-anomaly-mean-value))%2Ctime%3A(from%3A'2023-09-28T14%3A57%3A00.000Z'%2Cmode%3Aabsolute%2Cto%3A'2023-09-28T15%3A17%3A00.000Z'))&_a=(explorer%3A(mlExplorerFilter%3A(filterActive%3A!t%2CfilteredFields%3A!(key%2Cthird-key)%2CinfluencersFilterQuery%3A(bool%3A(minimum_should_match%3A1%2Cshould%3A!((match_phrase%3A(key%3Athird-key)))))%2CqueryString%3A'key%3A%22third-key%22')%2CmlExplorerSwimlane%3A()))",
			"reason": "Alerts are raised based on real-time scores. Remember that scores may be adjusted over time as data continues to be analyzed.",
			"job_id": "rt-anomaly-mean-value",
			"anomaly_score": 73.63508175828011,
			"is_interim": false,
			"anomaly_timestamp": 1695913620000,
			"top_records": [{
				"job_id": "rt-anomaly-mean-value",
				"record_score": 73.63516446528412,
				"initial_record_score": 73.63516446528412,
				"detector_index": 0,
				"is_interim": false,
				"timestamp": 1695913620000,
				"partition_field_name": "key",
				"partition_field_value": "third-key",
				"function": "mean",
				"actual": [
					3
				],
				"typical": [
					4.187715468532429
				]
			}],
			"top_influencers": [{
				"job_id": "rt-anomaly-mean-value",
				"influencer_field_name": "key",
				"influencer_field_value": "third-key",
				"influencer_score": 73.63508175828011,
				"initial_influencer_score": 73.63508175828011,
				"is_interim": false,
				"timestamp": 1695913620000
			}],
			"action_group": "anomaly_score_match",
			"flapping": false,
			"flapping_history": [
				true,
				false,
				false,
				false
			],
			"instance": {
				"id": "rt-anomaly-mean-value"
			},
			"maintenance_window_ids": [],
			"rule": {
				"category": "Anomaly detection alert",
				"consumer": "alerts",
				"execution": {
					"uuid": "e9e681d4-c8e4-43eb-82e5-a58bdf7ffe12"
				},
				"name": "rt-ad-alert-influencer",
				"parameters": {
					"severity": 5,
					"resultType": "influencer",
					"includeInterim": false,
					"jobSelection": {
						"jobIds": [
							"rt-anomaly-mean-value"
						],
						"groupIds": []
					},
					"lookbackInterval": null,
					"topNBuckets": null
				},
				"producer": "ml",
				"revision": 0,
				"rule_type_id": "xpack.ml.anomaly_detection_alert",
				"tags": [],
				"uuid": "9e1d6bc0-5e10-11ee-8416-3bf48cca0922"
			},
			"status": "active",
			"uuid": "c9c1f075-9985-4c55-8ff8-22349cb30269",
			"workflow_status": "open",
			"duration": {
				"us": "99021000000"
			},
			"start": "2023-09-28T15:07:12.868Z",
			"time_range": {
				"gte": "2023-09-28T15:07:12.868Z"
			}
		},
		"space_ids": [
			"default"
		],
		"version": "8.11.0"
	},
	"@timestamp": "2023-09-28T15:08:51.889Z",
	"event": {
		"action": "active",
		"kind": "signal"
	},
	"tags": []
}
```
</details>

Now they look like:

<details>
  <summary>Flattened</summary>

```
{
	"kibana.alert.url": "/app/ml/explorer/?_g=(ml%3A(jobIds%3A!(rt-anomaly-mean-value))%2Ctime%3A(from%3A'2023-09-28T15%3A03%3A00.000Z'%2Cmode%3Aabsolute%2Cto%3A'2023-09-28T15%3A23%3A00.000Z'))&_a=(explorer%3A(mlExplorerFilter%3A(filterActive%3A!t%2CfilteredFields%3A!(key%2Cthird-key)%2CinfluencersFilterQuery%3A(bool%3A(minimum_should_match%3A1%2Cshould%3A!((match_phrase%3A(key%3Athird-key)))))%2CqueryString%3A'key%3A%22third-key%22')%2CmlExplorerSwimlane%3A()))",
	"kibana.alert.reason": "Alerts are raised based on real-time scores. Remember that scores may be adjusted over time as data continues to be analyzed.",
	"kibana.alert.job_id": "rt-anomaly-mean-value",
	"kibana.alert.anomaly_score": 72.75515452061356,
	"kibana.alert.is_interim": false,
	"kibana.alert.anomaly_timestamp": 1695913980000,
	"kibana.alert.top_records": [{
		"job_id": "rt-anomaly-mean-value",
		"record_score": 72.75515452061356,
		"initial_record_score": 72.75515452061356,
		"detector_index": 0,
		"is_interim": false,
		"timestamp": 1695913980000,
		"partition_field_name": "key",
		"partition_field_value": "third-key",
		"function": "mean",
		"actual": [
			0.5
		],
		"typical": [
			4.138745343296527
		]
	}],
	"kibana.alert.top_influencers": [{
		"job_id": "rt-anomaly-mean-value",
		"influencer_field_name": "key",
		"influencer_field_value": "third-key",
		"influencer_score": 72.75515452061356,
		"initial_influencer_score": 72.75515452061356,
		"is_interim": false,
		"timestamp": 1695913980000
	}],
	"kibana.alert.rule.category": "Anomaly detection alert",
	"kibana.alert.rule.consumer": "alerts",
	"kibana.alert.rule.execution.uuid": "17fef3d3-d595-4362-837e-b2a73650169e",
	"kibana.alert.rule.name": "rt-ad-alert-influencer",
	"kibana.alert.rule.parameters": {
		"severity": 5,
		"resultType": "influencer",
		"includeInterim": false,
		"jobSelection": {
			"jobIds": [
				"rt-anomaly-mean-value"
			],
			"groupIds": []
		},
		"lookbackInterval": null,
		"topNBuckets": null
	},
	"kibana.alert.rule.producer": "ml",
	"kibana.alert.rule.revision": 0,
	"kibana.alert.rule.rule_type_id": "xpack.ml.anomaly_detection_alert",
	"kibana.alert.rule.tags": [],
	"kibana.alert.rule.uuid": "757c7610-5e11-11ee-8bc6-a95c3ced4757",
	"kibana.space_ids": [
		"default"
	],
	"@timestamp": "2023-09-28T15:14:52.057Z",
	"event.action": "active",
	"event.kind": "signal",
	"kibana.alert.action_group": "anomaly_score_match",
	"kibana.alert.flapping": false,
	"kibana.alert.flapping_history": [
		true,
		false,
		false,
		false
	],
	"kibana.alert.instance.id": "rt-anomaly-mean-value",
	"kibana.alert.maintenance_window_ids": [],
	"kibana.alert.status": "active",
	"kibana.alert.uuid": "ac1f0d7c-461b-4fc6-b4c3-04416ac876d3",
	"kibana.alert.workflow_status": "open",
	"kibana.alert.duration.us": "99028000000",
	"kibana.alert.start": "2023-09-28T15:13:13.028Z",
	"kibana.alert.time_range": {
		"gte": "2023-09-28T15:13:13.028Z"
	},
	"kibana.version": "8.11.0",
	"tags": []
}
```
</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-02 14:05:01 -04:00
Melissa Alvarez
267328bfc7
[ML] Data frame analytics: ensures destination index setting is persisted when cloning (#167584)
## Summary

Fixes https://github.com/elastic/kibana/issues/164696

This PR ensures that the `Destination index same as job ID` state is
persisted when switching between steps for original jobs and cloned
jobs.


adb1cbcf-3387-4467-bbf9-666388e3145d

### 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
- [ ] 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)
2023-10-02 10:04:12 -06:00
István Zoltán Szabó
7d777423b9
[ML] Amends the ML app description on the management page (#166843) 2023-10-02 08:06:15 -07:00
Quynh Nguyen (Quinn)
007c3413df
[ML] Add Create a data view button to index or saved search selector in ML pages and Transforms management (#166668)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-02 09:45:34 -05:00
Melissa Alvarez
ede8d61a36
[ML] Trained models: Functional tests (#167697)
## Summary

Fixes https://github.com/elastic/kibana/issues/165083
Fixes https://github.com/elastic/kibana/issues/165084

This PR 
- ensures that the input for field map is empty before adding the edited
value
- removes source index requirement for review and create step as that is
not available in the test environment model

flaky test runner build
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3267

### 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
- [ ] 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)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] 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)
2023-10-02 08:34:11 -06:00
Jiawei Wu
092cc0d098
[RAM][Maintenance Window] Add maintenance window solution selection. (#166781)
## Summary
Resolves: https://github.com/elastic/kibana/issues/166301

Adds support for solution/category filtering to maintenance windows by
adding a new property: `category_ids`. Selecting one or more solutions
when creating/updating a maintenance window will cause the maintenance
window to only suppress rule types belonging to said solutions. In order
to achieve filtering by solution/category, we are adding a new field to
the rule types schema called `category`. This field should map to the
feature category that the rule type belongs to (`observability`,
`securitySolution` or `management`).

Our initial plan was to use feature IDs or rule type IDs to accomplish
this filtering, we decided against using rule type IDs because if a new
rule type gets added, we need to change the API to support this new rule
type. We decided against feature IDs because it's a very anti-serverless
way of accomplishing this feature, as we don't want to expose feature
IDs to APIs. We decided on app categories because it works well with
serverless and should be much easier to maintain if new rule types are
added in the future.

This means the `rule_types` API has to be changed to include this new
field, although it shouldn't be a breaking change since we're just
adding a new field. No migrations are needed since rule types are in
memory and maintenance windows are backwards compatible.


![image](d07b05cd-ade8-46a4-a4c0-ab623c31c11b)

### Error state:

![image](b61984b4-c1e1-4e9b-98b4-97a681e977a8)

### Checklist

Delete any items that are not applicable to this PR.

- [x] 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)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
2023-10-02 09:20:53 +01:00
Dima Arnautov
3ad5addd89
[ML] Alerts as data integration for Anomaly Detection rule type (#166349)
## Summary

Part of #165958

Replaces usage of the deprecated `alertFactory` with the new alerts
client and adds alerts-as-data integration for Anomaly Detection
alerting rule type.

Alert instances are stored in
`.alerts-ml.anomaly-detection.alerts-default` index and extends the
common `AlertSchema`.

<details>
  <summary>Result mappings</summary>
  
  ```json
{
  ".internal.alerts-ml.anomaly-detection.alerts-default-000001": {
    "mappings": {
      "dynamic": "false",
      "_meta": {
        "namespace": "default",
        "kibana": {
          "version": "8.11.0"
        },
        "managed": true
      },
      "properties": {
        "@timestamp": {
          "type": "date"
        },
        "event": {
          "properties": {
            "action": {
              "type": "keyword"
            },
            "kind": {
              "type": "keyword"
            }
          }
        },
        "kibana": {
          "properties": {
            "alert": {
              "properties": {
                "action_group": {
                  "type": "keyword"
                },
                "anomaly_score": {
                  "type": "double"
                },
                "anomaly_timestamp": {
                  "type": "date"
                },
                "case_ids": {
                  "type": "keyword"
                },
                "duration": {
                  "properties": {
                    "us": {
                      "type": "long"
                    }
                  }
                },
                "end": {
                  "type": "date"
                },
                "flapping": {
                  "type": "boolean"
                },
                "flapping_history": {
                  "type": "boolean"
                },
                "instance": {
                  "properties": {
                    "id": {
                      "type": "keyword"
                    }
                  }
                },
                "is_interim": {
                  "type": "boolean"
                },
                "job_id": {
                  "type": "keyword"
                },
                "last_detected": {
                  "type": "date"
                },
                "maintenance_window_ids": {
                  "type": "keyword"
                },
                "reason": {
                  "type": "keyword"
                },
                "rule": {
                  "properties": {
                    "category": {
                      "type": "keyword"
                    },
                    "consumer": {
                      "type": "keyword"
                    },
                    "execution": {
                      "properties": {
                        "uuid": {
                          "type": "keyword"
                        }
                      }
                    },
                    "name": {
                      "type": "keyword"
                    },
                    "parameters": {
                      "type": "flattened",
                      "ignore_above": 4096
                    },
                    "producer": {
                      "type": "keyword"
                    },
                    "revision": {
                      "type": "long"
                    },
                    "rule_type_id": {
                      "type": "keyword"
                    },
                    "tags": {
                      "type": "keyword"
                    },
                    "uuid": {
                      "type": "keyword"
                    }
                  }
                },
                "start": {
                  "type": "date"
                },
                "status": {
                  "type": "keyword"
                },
                "time_range": {
                  "type": "date_range",
                  "format": "epoch_millis||strict_date_optional_time"
                },
                "top_influencers": {
                  "type": "nested",
                  "dynamic": "false",
                  "properties": {
                    "influencer_field_name": {
                      "type": "keyword"
                    },
                    "influencer_field_value": {
                      "type": "keyword"
                    },
                    "influencer_score": {
                      "type": "double"
                    },
                    "initial_influencer_score": {
                      "type": "double"
                    },
                    "is_interim": {
                      "type": "boolean"
                    },
                    "job_id": {
                      "type": "keyword"
                    },
                    "timestamp": {
                      "type": "date"
                    }
                  }
                },
                "top_records": {
                  "type": "nested",
                  "dynamic": "false",
                  "properties": {
                    "actual": {
                      "type": "double"
                    },
                    "by_field_name": {
                      "type": "keyword"
                    },
                    "by_field_value": {
                      "type": "keyword"
                    },
                    "detector_index": {
                      "type": "integer"
                    },
                    "field_name": {
                      "type": "keyword"
                    },
                    "function": {
                      "type": "keyword"
                    },
                    "initial_record_score": {
                      "type": "double"
                    },
                    "is_interim": {
                      "type": "boolean"
                    },
                    "job_id": {
                      "type": "keyword"
                    },
                    "over_field_name": {
                      "type": "keyword"
                    },
                    "over_field_value": {
                      "type": "keyword"
                    },
                    "partition_field_name": {
                      "type": "keyword"
                    },
                    "partition_field_value": {
                      "type": "keyword"
                    },
                    "record_score": {
                      "type": "double"
                    },
                    "timestamp": {
                      "type": "date"
                    },
                    "typical": {
                      "type": "double"
                    }
                  }
                },
                "url": {
                  "type": "keyword",
                  "index": false,
                  "ignore_above": 2048
                },
                "uuid": {
                  "type": "keyword"
                },
                "workflow_status": {
                  "type": "keyword"
                },
                "workflow_tags": {
                  "type": "keyword"
                }
              }
            },
            "space_ids": {
              "type": "keyword"
            },
            "version": {
              "type": "version"
            }
          }
        },
        "tags": {
          "type": "keyword"
        }
      }
    }
  }
}
  ```
</details>

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
2023-09-28 15:46:42 +02:00
Cee Chen
581b30b743
Upgrade EUI to v88.5.0 (#166868)
`v88.3.0``v88.5.0`

closes #151514

---

## [`88.5.0`](https://github.com/elastic/eui/tree/v88.5.0)

- Updated `EuiCallOut` with a new `onDismiss` prop
([#7156](https://github.com/elastic/eui/pull/7156))
- Added a new `renderCustomToolbar` prop to `EuiDataGrid`, which allows
custom rendering of the toolbar.
([#7190](https://github.com/elastic/eui/pull/7190))
- Added a new `allowResetButton` prop to
`toolbarVisibility.showDisplaySelector` of `EuiDataGrid`, which allows
hiding the "Reset to default" button from the display settings popover.
([#7190](https://github.com/elastic/eui/pull/7190))
- Added a new `additionalDisplaySettings` prop to
`toolbarVisibility.showDisplaySelector` of `EuiDataGrid`, which allows
rendering extra settings inside the display settings popover.
([#7190](https://github.com/elastic/eui/pull/7190))
- Updated `EuiDataGrid`'s toolbar display settings button icon
([#7190](https://github.com/elastic/eui/pull/7190))
- Updated `EuiTextTruncate` with significantly improved iteration
performance. Removed `measurementRenderAPI` prop, as `EuiTextTruncation`
now only uses more performant canvas render API
([#7210](https://github.com/elastic/eui/pull/7210))
- Updated `EuiPopover` with a new configurable `repositionToCrossAxis`
prop ([#7211](https://github.com/elastic/eui/pull/7211))
- Updated `EuiDatePicker` to support `compressed` input styling
([#7218](https://github.com/elastic/eui/pull/7218))
- Added `gradient` and `palette` icon glyphs.
([#7220](https://github.com/elastic/eui/pull/7220))

**Bug fixes**

- Fixed `EuiPopover`'s missing animations on popover close
([#7211](https://github.com/elastic/eui/pull/7211))
- Fixed `EuiInputPopover` anchoring to the wrong side and missing
shadows on smaller screens
([#7211](https://github.com/elastic/eui/pull/7211))
- Fixed `EuiSuperDatePicker` icon spacing on the quick select button
([#7217](https://github.com/elastic/eui/pull/7217))
- Fixed a missing type in `EuiMarkdownEditor`'s default processing
plugins ([#7221](https://github.com/elastic/eui/pull/7221))


## [`88.4.1`](https://github.com/elastic/eui/tree/v88.4.1)

**Bug fixes**

- Fixed missing `className`s on `EuiTextTruncate`
([#7212](https://github.com/elastic/eui/pull/7212))
- Fixed `title`s on `EuiComboBox` dropdown options to always be present
([#7212](https://github.com/elastic/eui/pull/7212))
- Fixed `EuiComboBox` truncation issues when search is an empty space
([#7212](https://github.com/elastic/eui/pull/7212))

## [`88.4.0`](https://github.com/elastic/eui/tree/v88.4.0)

- Updated `EuiComboBox` to allow configuring text truncation behavior
via `truncationProps`. These props can be set on the entire combobox as
well as on on individual dropdown options.
([#7028](https://github.com/elastic/eui/pull/7028))
- Updated `EuiInMemoryTable` with a new `searchFormat` prop (defaults to
`eql`). When setting this prop to `text`, the built-in search bar will
ignore EQL syntax and allow searching for plain strings with special
characters and symbols.
([#7175](https://github.com/elastic/eui/pull/7175))

**Bug fixes**

- `EuiComboBox` now always shows the highlighted search text, even on
truncated text ([#7028](https://github.com/elastic/eui/pull/7028))
- Fixed missing i18n in `EuiSearchBar`'s default placeholder and
aria-label text ([#7175](https://github.com/elastic/eui/pull/7175))
- Fixed the inline compressed styles of `EuiDescriptionListTitle` to use
a taller line-height for readability
([#7185](https://github.com/elastic/eui/pull/7185))
- Fixed `EuiComboBox` to correctly truncate selected items when
displayed as pills and plain text
([#7193](https://github.com/elastic/eui/pull/7193))

**Accessibility**

- Added `aria-current` attribute to `EuiTablePagination`
([#7186](https://github.com/elastic/eui/pull/7186))

**CSS-in-JS conversions**

- Converted `EuiDroppable` and `EuiDraggable` to Emotion; Removed
`$euiDragAndDropSpacing` Sass variables
([#7187](https://github.com/elastic/eui/pull/7187))

---------

Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: Jan Monschke <jan.monschke@elastic.co>
Co-authored-by: Thomas Watson <watson@elastic.co>
2023-09-27 13:04:45 -05:00
James Gowdy
354efc2fc8
[ML] Retain created_by setting when exporting anomaly detection jobs (#167319)
When exporting an anomaly detection job, it would be useful if the
original `created_by` property was not removed from the job config.


Related to
https://github.com/elastic/kibana/pull/167021#discussion_r1337007611
Related PR https://github.com/elastic/kibana/pull/88898
2023-09-27 18:45:36 +01:00
James Gowdy
55a86ba120
[ML] Changing wording of awaiting ML nodes messages (#167306)
Updates the text for the info callouts which are displayed when anomaly
detection jobs are waiting for a node.

@szabosteve would you mind having a review of the text?

**Jobs list**

![image](2f5e9293-7834-483f-9898-e797150963f8)



**Creating a new job**

![image](dcf594e4-67a1-4b96-95d7-bc832b77b1af)

Fixes https://github.com/elastic/kibana/issues/165472

---------

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2023-09-27 18:45:18 +01:00
Brad White
7d92c16ec0
Pick ML UI from #166813 (#167354)
## Summary

We're breaking https://github.com/elastic/kibana/pull/166813 up into
smaller PRs in the interest of getting PRs through sooner for type
fixes. These are the changes for ML UI.

---------

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2023-09-27 13:04:18 +02:00
James Gowdy
c18513e23d
[ML] Removing global isServerless flag (#166651)
Removed `isServerless` flag which lived in our global context and had to
be passed about to the various components which create their own version
of the context using `getMlGlobalServices`
This PR adds a new context which contains flags for all of the features
which can be toggled when in serverless mode.
Flags added:
```
 showNodeInfo
 showMLNavMenu
 showLicenseInfo
 isADEnabled
 isDFAEnabled
 isNLPEnabled
```
The enabled features flags are now read from the config file client
side, rather than using capabilities.

Additional changes:
- Changes the wording of the awaiting ML node callout in serverless.
- In the search project, the default ML page is the trained models list
and not Overview
- Reenables the Memory Usage page for all projects

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-27 09:32:17 +01:00
Quynh Nguyen (Quinn)
4dfd31def0
[ML] Add data drift detection workflow from Trained models to Data comparison view (#162853)
## Summary

This PR adds data drift detection workflow from Trained models to Data
comparison view. It also renames Data comparison to Data Drift.

**From the new map view in Trained model list:**

- Clicking on the index icon in the map view will give an option/action
to Analyze data drift


a68163ab-8a83-4378-8cf3-ea49f4480a06

- If model has detected related indices, it will also give an option to
Analyze data drift in the Transform actions

**From the data comparison/drift page:**

- Default screen with list of available data views and saved search will
be shown

<img width="1470" alt="Screen Shot 2023-09-07 at 00 22 01"
src="db13b8b7-9d90-4220-b03e-9f9d12ab53e9">

- But can also customize index patterns for the data sets to analyze.
Upon 'analyzing', a new data view will be created if needed (either
permanently or temporarily).

<img width="1271" alt="Screen Shot 2023-08-29 at 16 56 57"
src="e000e920-162b-4369-8762-70b6244e50e7">

<img width="1470" alt="Screen Shot 2023-09-07 at 00 22 49"
src="6577a530-c3b0-4ab9-95e4-d1d8fd1c9f0a">

- If there exists a data view with exact combination of index patterns
and time field, it will use that data view
- If there exists a data view with the same index patterns but different
time field, it will create a new data view with name
`{referencePattern},{comparisonPattern}-{timeField}`
- If no data view exists that matches, it will create a new data view
with name `{referencePattern},{comparisonPattern}`


## For reviewers:
- **appex-sharedux**: [Small change in the exported type interface for
BaseSavedObjectFinder](https://github.com/elastic/kibana/pull/162853/files#diff-5e2e62df8aba5ac9445962bfa00eee933a386110d0a24dfe6ac0f300a796ccc3)
to correctly list `children` as an accepted prop. This prop which is
used for the `toolsRight`.
- **security-solution**: Renaming of `Data comparison` to `Data Drift`

## Tests:
[Flaky test suite runner with Data Drift
test](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3216#018accc2-d33b-4cd6-a178-589e6698b675)
... successful after 50 runs


### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added [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
- [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
- [ ] 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)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] 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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-26 15:15:35 -07:00
James Gowdy
302ec109ce
[ML] Adding created_by job property for the advanced wizard (#167021)
Adds `created_by` property of `advanced-wizard` to all jobs created by
the advanced job wizard.
Previously no `created_by` property was added to these jobs.

When cloning, jobs with no `created_by` property or one with a value of
`advanced-wizard` will be opened in the advanced wizard.

Closes https://github.com/elastic/kibana/issues/166053
2023-09-26 17:25:25 +01:00
Marco Antonio Ghiani
34c084d65a
[Type checks] Fix infra obs ui typecheck (#167217)
## 📓  Summary

These changes fix the type-check issues related to infra obs UI code.
It also includes some fixes for the APM plugin that were stopping the
check step from passing.

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
2023-09-26 17:05:54 +02:00
Melissa Alvarez
d4bb52b8b2
[ML] Data Frame Analytics Trained models flyout: update horizontal steps size (#167095)
## Summary

Related issue: https://github.com/elastic/kibana/issues/162831

- uses small size for EuiStepsHorizontal component

<img width="1354" alt="image"
src="cfe55fce-2fdf-4b6f-ac91-291c96c7c54c">



### 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
- [ ] 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-25 16:19:25 -06:00
Dima Arnautov
2bce7bbcbe
[ML] Shared service for elastic curated models (#167000)
## Summary

Adds a shared service for elastic curated models. The first use case is
to provide a default/recommended ELSER version based on the hardware of
the current cluster.

#### Why?
In 8.11 we'll provide a platform-specific version of the ELSER v2
alongside the portable one. At the moment several solutions refer to
ELSER for download/inference purposes with a `.elser_model_1` constant.
Starting 8.11 the model ID will vary, so using the `ElastcModels`
service allows retrieving the recommended version of ELSER for the
current cluster without any changes by solution teams in future
releases. It is still possible to request an older version of the model
if necessary.

#### Implementation 
- Adds a new Kibana API endpoint `/trained_models/model_downloads` that
provides a list of model definitions, with the `default` and
`recommended` flags.
- Adds a new Kibana API endpoint `/trained_models/elser_config` that
provides an ELSER configuration based on the cluster architecture.
- `getELSER` method is exposed from the plugin `setup` server-side as
part of our shared services and plugin `start` client-side.

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
2023-09-25 09:15:35 -07:00
Melissa Alvarez
840e1216b0
[ML] Trained model testing: only show indices with supported fields (#166490)
## Summary

Related comment in issue:
https://github.com/elastic/kibana/pull/159150#discussion_r1288694083

This PR adds a `supportedFields` property to the inferrer class and,
when creating the index options, filters to those containing supported
fields.

For now, the supported fields default to 'text' as all inferrer types
require that.

### 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
2023-09-21 13:35:06 -06:00
James Gowdy
e0ae59fa60
[ML] Switching to config files for serverless ML features (#166477)
Switches to using the serverless config file to enabled/disable ML
features rather than a function shared from the setup contract.
Storing these flags in a config file means they are already available
when setup runs and so can be used when registering integrations into
other plugins.

Removes the dependency on ML from `security_solution_serverless`,
`serverless_observability` and `serverless_search`
2023-09-21 14:46:19 +01:00
Melissa Alvarez
e5cd6fb493
[ML] Data Frame Analytics Trained models: add ability to reindex after pipeline creation success (#166312)
## Summary

Related issue: https://github.com/elastic/kibana/issues/164997

In the Trained Models list 'Deploy Model' flyout for DFA models:
- adds the ability to reindex in the last step of the flyout after
pipeline creation success

<img width="1343" alt="image"
src="ae76fb04-889c-45da-a9c0-394b5cd039c2">

<img width="1206" alt="image"
src="39bee9b1-338b-4b5b-a295-789363f6d387">

<img width="1107" alt="image"
src="aa98ff65-1b37-46a4-b411-4adb3fe9df17">

<img width="1216" alt="image"
src="2e7c4930-1036-415e-8d27-19f7e6012701">

<img width="1343" alt="image"
src="3654cc6f-4113-44cc-86ab-93dbdf49a9a9">


### 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
- [ ] 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-19 16:55:34 -06:00
James Gowdy
de8e1ccee2
[ML] Fixing ML settings in setup (#166421)
Moving when settings are registered to fix crash in kibana starting up.
2023-09-14 00:26:27 -07:00
James Gowdy
09faf897c9
[ML] Serverless compatibility fixes (#163724)
**ML Management page**
- Fixes general page loading issues.
- Ensures only enabled features are shown as tabs
- Ensures only jobs for enabled features can be exported and imported.
- Ensures only enabled features are listed in the saved object sync
output.
- On trained models tab:
  - Only lists DFA models if NLP is disabled.
  - Only lists non-DFA models if DFA is disabled.

**Anomaly Detection**
- Hides node information in anomaly detection jobs list.
- Hides the Exclude frozen data option in the Use full time range
selector in job wizards.

**Data frame analytics**
 - Hides all node and license level information.

**Trained models**
 - Only lists DFA models if NLP is disabled.
 - Only lists non-DFA models if DFA is disabled.
 - Hides all node and license level information.
 - Hides DFA nodes 

**Notifications and memory usage**
- Ensures only enabled features are mentioned. Including selectable
types in the search bar filters.

**Integrations with other plugins**
- Changes registration for integrations into other plugins so they only
happen if the relevant feature is enabled.
   - Client side: UI actions, cases, embeddables, alerts, maps.
   - Server side: Sample data sets, cases

**AIOPS**
- Hides the Exclude frozen data option in the Use full time range
selector on all pages

**Notes for non ML team reviewers**

**response-ops**
I've divided the
[persistable_state.ts](https://github.com/elastic/kibana/pull/163724#diff-e02dc0b6cb5b63965372b1f4a84d2287cba31a15ab525ab7983f02d09f23879f)
test into basic and trial version.
The ML cases attachments should only be registered if anomaly detection
is available in a trial or platinum license. This was a bug which I
noticed when making serverless changes.

 **Observability**
I've made a few minor changes to the nav menu, fixing names of ML
features and adding the missing Change point detection AIOPs page.

**Security solution**
I've made a few minor changes to the nav menu, fixing names of ML
features and adding some missing ML features.
I think the icons being used will need to be revisited before release as
we have [official ML
icons](https://elastic.github.io/eui/#/display/icons#apps) but not for
every page. So we should probably either have new icons created or all
agree on which standard non-ML icons should be used for the ones which
are missing.

**Search**
The NLP feature is currently disabled in main, I believe this was an
attempt to stop ML anomaly detection alert rules from being registered.
I've reenabled NLP and changed the way we're registering the alerts.
They will now only be registered if the anomaly detection feature is
enabled.


Fixes https://github.com/elastic/kibana/issues/163372
2023-09-13 12:07:55 -07:00
Dima Arnautov
5271dd31c2
[ML] Improve the UX of adding ML embeddables to a dashboard (#165714)
## Summary

Closes #141608 

- Replaces custom component for attaching embeddables with the one
provided by the `presentation_utils` plugin
![Sep-05-2023
17-57-27](c8584f4f-119b-4484-97c1-5882bb3afd7c)

![Sep-05-2023
17-59-06](7d5695e7-3310-42d6-8b8b-408d06938b88)



- Adds support for setting a number of charts while attaching Anomaly
charts to cases

### 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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] 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))
- [x] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers
2023-09-07 18:20:47 +02:00
István Zoltán Szabó
488b987754
[ML] Shortens toast message in DFA job map (#165936)
## Summary

This PR removes an unnecessary `please` from a toast message making it
more succinct.

### Checklist

- [x] 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)
2023-09-07 03:34:02 -07:00
Trevor Pierce
3cb13fb9c1
Upgrade EUI to v88.1.0 (#165047)
## PR change summary

`v87.2.0``v88.1.0`

⚠️ The biggest thing to QA in this PR is several **breaking changes** to
`EuiDescriptionList`.

### Description list `columnWidths` prop

This PR introduces a new `columnWidths` prop and removes several Kibana
instances of custom CSS overrides to title/description column widths.

The primary motivation behind this is not just to reduce custom CSS, but
also because v88.0.0 introduced an underlying CSS change of `column`
description lists to using [`display: grid`
CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout).
The new prop allows us to support existing description list custom
widths while not requiring Kibana developers to understand or write grid
CSS (except for 1 or two scenarios around `max-width`).

⚠️ **No user-facing UI around column widths should have regressed as a
result of these changes. If they have, please let us know in this PR.**

### Description list gutter size changes

The prop `gutterSize` has been renamed to `rowGutterSize` and the
default size is now `s` instead of `m`.

The change to `s` from `m` means there is an **expected** smaller gap
between list items (see below screenshots):

**Current `EuiDescriptionList` with default `rowGutterSize="s"`**
<img width="753" alt=""
src="c17aef28-ed3b-40c4-84c3-396e788b13bb">

**Prior `EuiDescriptionList` with default `gutterSize="m"`**
<img width="721" alt=""
src="84d5f5a2-8fa6-4f99-9dc0-73fd143aa1e1">

If Kibana teams prefer to keep the previous `m` gutter for their
instances of `EuiDescriptionList`, you have a couple of options:

1. Let EUI team know in the PR and we can set usage back to what it was
before
2. Set `rowGutterSize="m"` yourselves manually

---

## [`88.1.0`](https://github.com/elastic/eui/tree/v88.1.0)

- Added `font.defaultUnits` theme token. EUI component font sizes
default to `rem` units - this token allows consumers to configure this
to `px` or `em` ([#7133](https://github.com/elastic/eui/pull/7133))
- Updated `EuiDescriptionList` with new `columnWidths` prop
([#7146](https://github.com/elastic/eui/pull/7146))

**Bug fixes**

- Fixed `EuiDataGrid`'s keyboard shortcuts popover display
([#7146](https://github.com/elastic/eui/pull/7146))

**CSS-in-JS conversions**

- Renamed `useEuiFontSize()`'s `measurement` option to `unit` for
clarity ([#7133](https://github.com/elastic/eui/pull/7133))

## [`88.0.0`](https://github.com/elastic/eui/tree/v88.0.0)

- Updated `EuiDescriptionList` with a new `columnGutterSize` prop
([#7062](https://github.com/elastic/eui/pull/7062))

**Deprecations**

- Deprecated `EuiSuggest`. We recommend using `EuiSelectable` or
`EuiComboBox` instead
([#7122](https://github.com/elastic/eui/pull/7122))
- Deprecated `EuiControlBar`. We recommend using `EuiBottomBar` instead
([#7122](https://github.com/elastic/eui/pull/7122))
- Deprecated `EuiColorStops`. We recommend copying the component to your
application if necessary
([#7122](https://github.com/elastic/eui/pull/7122))
- Deprecated `EuiNotificationEvent`. We recommend copying the component
to your application if necessary
([#7122](https://github.com/elastic/eui/pull/7122))

**Breaking changes**

- Renamed `EuiDescriptionList`'s `gutterSize` prop to `rowGutterSize`
([#7062](https://github.com/elastic/eui/pull/7062))
- `EuiDescriptionList`'s `rowGutterSize` prop now defaults to a size of
`s` (was previously `m`)
([#7062](https://github.com/elastic/eui/pull/7062))

**Accessibility**

- Fixed the dark mode colors of inline `EuiDescriptionListTitle`s to
meet WCAG color contrast requirements
([#7062](https://github.com/elastic/eui/pull/7062))

**CSS-in-JS conversions**

- Converted `EuiKeyPadMenuItem` to Emotion; Removed `$euiKeyPadMenuSize`
and `$euiKeyPadMenuMarginSize`
([#7118](https://github.com/elastic/eui/pull/7118))

---------

Co-authored-by: Cee Chen <constance.chen@elastic.co>
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nikita Indik <nikita.indik@elastic.co>
2023-09-05 15:16:55 -05:00
Quynh Nguyen (Quinn)
a29bfb0e7b
[ML] Fix data comparison on basic license (#165383) 2023-09-04 23:44:57 -07:00
Melissa Alvarez
0877f8f9fc
[ML] Data Frame Analytics creation wizard: add ability to add custom urls to jobs (#164520)
## Summary

This PR adds an 'Additional settings' section in the 'Details' step
where the user can add custom urls.

<img width="1080" alt="image"
src="6094a544-9931-4ca3-a6ac-0e262df4f66b">

<img width="1059" alt="image"
src="52a98984-feef-4076-a139-4d7e95cf4485">

<img width="914" alt="image"
src="ff9e2575-c88c-4d9c-a612-ec92c960beb6">

<img width="1080" alt="image"
src="9878f31a-48de-4e1d-9fcd-85d36c74b580">


### 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
- [ ] 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-31 07:57:33 -06:00
Quynh Nguyen (Quinn)
bab03d4606
[ML] Improve loading time for populated fields in Transform creation wizard (#164790)
## Summary

Follow up of https://github.com/elastic/kibana/pull/163371. This PR
reduces the extra call in Transform as the same request to fetch 500
sample docs have already been made via the Field Stats provider. It also
reduces the number of docs fetched from 1000 to 500 for consistency.

If the performance journey improves, we can make the same change to Data
Frame Analytics.
### 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
- [ ] 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)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] 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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-30 09:50:18 -07:00
Dima Arnautov
f13adad484
[ML] Migrate all usages of EuiPage*_Deprecated (#165087)
## Summary

Closes https://github.com/elastic/kibana/issues/161408

Migrates all usages of `EuiPage*_Deprecated` components in ml and
transform plugins.
2023-08-30 10:13:24 +02:00
Melissa Alvarez
501e9bda2a
[ML] Anomaly detection wizard: ensure custom urls test functionality works as expected (#165055)
## Summary

Fixes https://github.com/elastic/kibana/issues/165051, ensuring the
correct time range is used in the target Dashboard or Discover pages
when testing custom URLs created in the Anomaly Detection job wizards.
Previously on subsequent tests the page would always open to show `Last
15 minutes` rather than a time range for which there are documents in
the data view used by the datafeed.

This PR ensures the original job object is not affected when the
datafeed is removed for sending off to the endpoint.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-29 16:24:01 -06:00