Use msearch to fetch the alerts for maintenance windows with scoped query#221702
Conversation
|
Pinging @elastic/response-ops (Team:ResponseOps) |
Previous query with top hits aggregation:New msearch: |
ymao1
left a comment
There was a problem hiding this comment.
Changes LGTM. Wondering if we have a functional test for MW with scoped queries already? If not, maybe we should add one.
| return; | ||
| } | ||
| response.hits.hits.forEach(({ fields }) => { | ||
| const mwIdField = fields![RUNTIME_MAINTENANCE_WINDOW_ID_FIELD]; |
There was a problem hiding this comment.
nit: should we use the optional accessor instead? Using ! will throw an error and cause the whole thing to fail if we can't access the field
There was a problem hiding this comment.
I used! because we add this field in order to return the related mw. it should be impossible not to access it.
But i will modify it and skip the hit if the field doesn't exist.
For the functional test: Yes we already have a functional test. It didn't fail before because we set the maxAlerts limit to 20 in the test configs whereas it was 1000 for the real runtime. Now I set it to 110 in order to be sure that we exceed the fixed limit of 100 in ES.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
|
Starting backport for target branches: 8.18, 8.19, 9.0 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
…uery (elastic#221702) Currently we use a search with a `top_hits` aggregation to get the alerts filtered with the scoped queries of the active maintenance windows. But since `top_hits` aggregation has a fixed limit of 100 hits we cannot use our max alerts limit to get all the alerts an execution can generate. This PR replaces `search` with `msearch` and removes the aggregation from the search query so we can use the maxAlerts limit for the response size. (cherry picked from commit 1343bfe) # Conflicts: # x-pack/platform/plugins/shared/alerting/server/alerts_client/alerts_client.test.ts # x-pack/platform/plugins/shared/alerting/server/alerts_client/alerts_client.ts # x-pack/platform/plugins/shared/alerting/server/alerts_client/lib/get_summarized_alerts_query.ts
…uery (elastic#221702) Currently we use a search with a `top_hits` aggregation to get the alerts filtered with the scoped queries of the active maintenance windows. But since `top_hits` aggregation has a fixed limit of 100 hits we cannot use our max alerts limit to get all the alerts an execution can generate. This PR replaces `search` with `msearch` and removes the aggregation from the search query so we can use the maxAlerts limit for the response size. (cherry picked from commit 1343bfe) # Conflicts: # x-pack/platform/plugins/shared/alerting/server/alerts_client/alerts_client.ts # x-pack/platform/plugins/shared/alerting/server/alerts_client/lib/get_summarized_alerts_query.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…uery (elastic#221702) Currently we use a search with a `top_hits` aggregation to get the alerts filtered with the scoped queries of the active maintenance windows. But since `top_hits` aggregation has a fixed limit of 100 hits we cannot use our max alerts limit to get all the alerts an execution can generate. This PR replaces `search` with `msearch` and removes the aggregation from the search query so we can use the maxAlerts limit for the response size. (cherry picked from commit 1343bfe) # Conflicts: # x-pack/platform/plugins/shared/alerting/server/alerts_client/alerts_client.test.ts # x-pack/platform/plugins/shared/alerting/server/alerts_client/alerts_client.ts # x-pack/platform/plugins/shared/alerting/server/alerts_client/lib/get_summarized_alerts_query.ts
…oped query (#221702) (#222488) # Backport This will backport the following commits from `main` to `9.0`: - [Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)](#221702) <!--- Backport version: 10.0.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-05-30T22:23:41Z","message":"Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)\n\nCurrently we use a search with a `top_hits` aggregation to get the\nalerts filtered with the scoped queries of the active maintenance\nwindows. But since `top_hits` aggregation has a fixed limit of 100 hits\nwe cannot use our max alerts limit to get all the alerts an execution\ncan generate.\n\nThis PR replaces `search` with `msearch` and removes the aggregation\nfrom the search query so we can use the maxAlerts limit for the response\nsize.","sha":"1343bfef35a97688844038617fe4feeb0ca5b924","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","backport missing","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"Use msearch to fetch the alerts for maintenance windows with scoped query","number":221702,"url":"https://github.com/elastic/kibana/pull/221702","mergeCommit":{"message":"Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)\n\nCurrently we use a search with a `top_hits` aggregation to get the\nalerts filtered with the scoped queries of the active maintenance\nwindows. But since `top_hits` aggregation has a fixed limit of 100 hits\nwe cannot use our max alerts limit to get all the alerts an execution\ncan generate.\n\nThis PR replaces `search` with `msearch` and removes the aggregation\nfrom the search query so we can use the maxAlerts limit for the response\nsize.","sha":"1343bfef35a97688844038617fe4feeb0ca5b924"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221702","number":221702,"mergeCommit":{"message":"Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)\n\nCurrently we use a search with a `top_hits` aggregation to get the\nalerts filtered with the scoped queries of the active maintenance\nwindows. But since `top_hits` aggregation has a fixed limit of 100 hits\nwe cannot use our max alerts limit to get all the alerts an execution\ncan generate.\n\nThis PR replaces `search` with `msearch` and removes the aggregation\nfrom the search query so we can use the maxAlerts limit for the response\nsize.","sha":"1343bfef35a97688844038617fe4feeb0ca5b924"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
…coped query (#221702) (#222489) # Backport This will backport the following commits from `main` to `8.19`: - [Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)](#221702) <!--- Backport version: 10.0.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-05-30T22:23:41Z","message":"Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)\n\nCurrently we use a search with a `top_hits` aggregation to get the\nalerts filtered with the scoped queries of the active maintenance\nwindows. But since `top_hits` aggregation has a fixed limit of 100 hits\nwe cannot use our max alerts limit to get all the alerts an execution\ncan generate.\n\nThis PR replaces `search` with `msearch` and removes the aggregation\nfrom the search query so we can use the maxAlerts limit for the response\nsize.","sha":"1343bfef35a97688844038617fe4feeb0ca5b924","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","backport missing","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"Use msearch to fetch the alerts for maintenance windows with scoped query","number":221702,"url":"https://github.com/elastic/kibana/pull/221702","mergeCommit":{"message":"Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)\n\nCurrently we use a search with a `top_hits` aggregation to get the\nalerts filtered with the scoped queries of the active maintenance\nwindows. But since `top_hits` aggregation has a fixed limit of 100 hits\nwe cannot use our max alerts limit to get all the alerts an execution\ncan generate.\n\nThis PR replaces `search` with `msearch` and removes the aggregation\nfrom the search query so we can use the maxAlerts limit for the response\nsize.","sha":"1343bfef35a97688844038617fe4feeb0ca5b924"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221702","number":221702,"mergeCommit":{"message":"Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)\n\nCurrently we use a search with a `top_hits` aggregation to get the\nalerts filtered with the scoped queries of the active maintenance\nwindows. But since `top_hits` aggregation has a fixed limit of 100 hits\nwe cannot use our max alerts limit to get all the alerts an execution\ncan generate.\n\nThis PR replaces `search` with `msearch` and removes the aggregation\nfrom the search query so we can use the maxAlerts limit for the response\nsize.","sha":"1343bfef35a97688844038617fe4feeb0ca5b924"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
…coped query (#221702) (#222490) # Backport This will backport the following commits from `main` to `8.18`: - [Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)](#221702) <!--- Backport version: 10.0.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ersin Erdal","email":"92688503+ersin-erdal@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-05-30T22:23:41Z","message":"Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)\n\nCurrently we use a search with a `top_hits` aggregation to get the\nalerts filtered with the scoped queries of the active maintenance\nwindows. But since `top_hits` aggregation has a fixed limit of 100 hits\nwe cannot use our max alerts limit to get all the alerts an execution\ncan generate.\n\nThis PR replaces `search` with `msearch` and removes the aggregation\nfrom the search query so we can use the maxAlerts limit for the response\nsize.","sha":"1343bfef35a97688844038617fe4feeb0ca5b924","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","backport missing","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"Use msearch to fetch the alerts for maintenance windows with scoped query","number":221702,"url":"https://github.com/elastic/kibana/pull/221702","mergeCommit":{"message":"Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)\n\nCurrently we use a search with a `top_hits` aggregation to get the\nalerts filtered with the scoped queries of the active maintenance\nwindows. But since `top_hits` aggregation has a fixed limit of 100 hits\nwe cannot use our max alerts limit to get all the alerts an execution\ncan generate.\n\nThis PR replaces `search` with `msearch` and removes the aggregation\nfrom the search query so we can use the maxAlerts limit for the response\nsize.","sha":"1343bfef35a97688844038617fe4feeb0ca5b924"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221702","number":221702,"mergeCommit":{"message":"Use msearch to fetch the alerts for maintenance windows with scoped query (#221702)\n\nCurrently we use a search with a `top_hits` aggregation to get the\nalerts filtered with the scoped queries of the active maintenance\nwindows. But since `top_hits` aggregation has a fixed limit of 100 hits\nwe cannot use our max alerts limit to get all the alerts an execution\ncan generate.\n\nThis PR replaces `search` with `msearch` and removes the aggregation\nfrom the search query so we can use the maxAlerts limit for the response\nsize.","sha":"1343bfef35a97688844038617fe4feeb0ca5b924"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
…uery (elastic#221702) Currently we use a search with a `top_hits` aggregation to get the alerts filtered with the scoped queries of the active maintenance windows. But since `top_hits` aggregation has a fixed limit of 100 hits we cannot use our max alerts limit to get all the alerts an execution can generate. This PR replaces `search` with `msearch` and removes the aggregation from the search query so we can use the maxAlerts limit for the response size.
…uery (elastic#221702) Currently we use a search with a `top_hits` aggregation to get the alerts filtered with the scoped queries of the active maintenance windows. But since `top_hits` aggregation has a fixed limit of 100 hits we cannot use our max alerts limit to get all the alerts an execution can generate. This PR replaces `search` with `msearch` and removes the aggregation from the search query so we can use the maxAlerts limit for the response size.
) ## Summary With elastic/response-ops-team#320 being closed, we need to update the known issue summary for the Maintenance Window bug and doc the fix (#221702) as a fixed bug in 9.0.3. **Corresponding 8.x updates**: #227876 ## Previews - [9.x known issues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues) - [9.0.3 fixed bugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes) --------- Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
) ## Summary With elastic/response-ops-team#320 being closed, we need to update the known issue summary for the Maintenance Window bug and doc the fix (#221702) as a fixed bug in 8.18.3. Note that I also added the known issue summary to 8.18.2, as it was previously missing. **Corresponding 9.x updates**: #227875 ## Previews - 8.18.0 known issues - 8.18.1 known issues - 8.18.2 known issues - 8.18.3 fixed bugs --------- Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
…tic#227876) ## Summary With elastic/response-ops-team#320 being closed, we need to update the known issue summary for the Maintenance Window bug and doc the fix (elastic#221702) as a fixed bug in 8.18.3. Note that I also added the known issue summary to 8.18.2, as it was previously missing. **Corresponding 9.x updates**: elastic#227875 ## Previews - 8.18.0 known issues - 8.18.1 known issues - 8.18.2 known issues - 8.18.3 fixed bugs --------- Co-authored-by: florent-leborgne <florent.leborgne@elastic.co> (cherry picked from commit 51b597b)
…tic#227875) ## Summary With elastic/response-ops-team#320 being closed, we need to update the known issue summary for the Maintenance Window bug and doc the fix (elastic#221702) as a fixed bug in 9.0.3. **Corresponding 8.x updates**: elastic#227876 ## Previews - [9.x known issues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues) - [9.0.3 fixed bugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes) --------- Co-authored-by: florent-leborgne <florent.leborgne@elastic.co> (cherry picked from commit 8262372)
…tic#227875) ## Summary With elastic/response-ops-team#320 being closed, we need to update the known issue summary for the Maintenance Window bug and doc the fix (elastic#221702) as a fixed bug in 9.0.3. **Corresponding 8.x updates**: elastic#227876 ## Previews - [9.x known issues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues) - [9.0.3 fixed bugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes) --------- Co-authored-by: florent-leborgne <florent.leborgne@elastic.co> (cherry picked from commit 8262372)
…#227875) (#228108) # Backport This will backport the following commits from `main` to `9.1`: - [[DOCS][9.x] Adds resolution info to known issue summary for MWs (#227875)](#227875) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nastasha Solomon","email":"79124755+nastasha-solomon@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-15T22:32:20Z","message":"[DOCS][9.x] Adds resolution info to known issue summary for MWs (#227875)\n\n## Summary\n\nWith elastic/response-ops-team#320 being\nclosed, we need to update the known issue summary for the Maintenance\nWindow bug and doc the fix\n(#221702) as a fixed bug in 9.0.3.\n\n**Corresponding 8.x updates**:\nhttps://github.com//pull/227876\n\n\n## Previews\n- [9.x known\nissues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues)\n- [9.0.3 fixed\nbugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes)\n\n---------\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"82623726d1ee89980387c817c3a2ba2948097fbd","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","backport:version","v9.1.0","v9.2.0"],"title":"[DOCS][9.x] Adds resolution info to known issue summary for MWs","number":227875,"url":"https://github.com/elastic/kibana/pull/227875","mergeCommit":{"message":"[DOCS][9.x] Adds resolution info to known issue summary for MWs (#227875)\n\n## Summary\n\nWith elastic/response-ops-team#320 being\nclosed, we need to update the known issue summary for the Maintenance\nWindow bug and doc the fix\n(#221702) as a fixed bug in 9.0.3.\n\n**Corresponding 8.x updates**:\nhttps://github.com//pull/227876\n\n\n## Previews\n- [9.x known\nissues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues)\n- [9.0.3 fixed\nbugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes)\n\n---------\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"82623726d1ee89980387c817c3a2ba2948097fbd"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227875","number":227875,"mergeCommit":{"message":"[DOCS][9.x] Adds resolution info to known issue summary for MWs (#227875)\n\n## Summary\n\nWith elastic/response-ops-team#320 being\nclosed, we need to update the known issue summary for the Maintenance\nWindow bug and doc the fix\n(#221702) as a fixed bug in 9.0.3.\n\n**Corresponding 8.x updates**:\nhttps://github.com//pull/227876\n\n\n## Previews\n- [9.x known\nissues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues)\n- [9.0.3 fixed\nbugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes)\n\n---------\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"82623726d1ee89980387c817c3a2ba2948097fbd"}}]}] BACKPORT--> Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com> Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
…#227875) (#228107) # Backport This will backport the following commits from `main` to `9.0`: - [[DOCS][9.x] Adds resolution info to known issue summary for MWs (#227875)](#227875) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nastasha Solomon","email":"79124755+nastasha-solomon@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-15T22:32:20Z","message":"[DOCS][9.x] Adds resolution info to known issue summary for MWs (#227875)\n\n## Summary\n\nWith elastic/response-ops-team#320 being\nclosed, we need to update the known issue summary for the Maintenance\nWindow bug and doc the fix\n(#221702) as a fixed bug in 9.0.3.\n\n**Corresponding 8.x updates**:\nhttps://github.com//pull/227876\n\n\n## Previews\n- [9.x known\nissues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues)\n- [9.0.3 fixed\nbugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes)\n\n---------\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"82623726d1ee89980387c817c3a2ba2948097fbd","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","backport:version","v9.1.0","v9.2.0"],"title":"[DOCS][9.x] Adds resolution info to known issue summary for MWs","number":227875,"url":"https://github.com/elastic/kibana/pull/227875","mergeCommit":{"message":"[DOCS][9.x] Adds resolution info to known issue summary for MWs (#227875)\n\n## Summary\n\nWith elastic/response-ops-team#320 being\nclosed, we need to update the known issue summary for the Maintenance\nWindow bug and doc the fix\n(#221702) as a fixed bug in 9.0.3.\n\n**Corresponding 8.x updates**:\nhttps://github.com//pull/227876\n\n\n## Previews\n- [9.x known\nissues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues)\n- [9.0.3 fixed\nbugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes)\n\n---------\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"82623726d1ee89980387c817c3a2ba2948097fbd"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227875","number":227875,"mergeCommit":{"message":"[DOCS][9.x] Adds resolution info to known issue summary for MWs (#227875)\n\n## Summary\n\nWith elastic/response-ops-team#320 being\nclosed, we need to update the known issue summary for the Maintenance\nWindow bug and doc the fix\n(#221702) as a fixed bug in 9.0.3.\n\n**Corresponding 8.x updates**:\nhttps://github.com//pull/227876\n\n\n## Previews\n- [9.x known\nissues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues)\n- [9.0.3 fixed\nbugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes)\n\n---------\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"82623726d1ee89980387c817c3a2ba2948097fbd"}}]}] BACKPORT--> Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com> Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
#227876) (#228106) # Backport This will backport the following commits from `8.19` to `8.18`: - [[DOCS][8.x] Adds resolution info to known issue summary for MWs (#227876)](#227876) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nastasha Solomon","email":"79124755+nastasha-solomon@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-15T22:32:35Z","message":"[DOCS][8.x] Adds resolution info to known issue summary for MWs (#227876)\n\n## Summary\n\nWith elastic/response-ops-team#320 being\nclosed, we need to update the known issue summary for the Maintenance\nWindow bug and doc the fix\n(#221702) as a fixed bug in\n8.18.3. Note that I also added the known issue summary to 8.18.2, as it\nwas previously missing.\n\n**Corresponding 9.x updates**:\nhttps://github.com//pull/227875\n\n## Previews\n- 8.18.0 known issues\n- 8.18.1 known issues\n- 8.18.2 known issues\n- 8.18.3 fixed bugs\n\n---------\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"51b597b301021e81297f34d6f96a936a94f2c892","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","backport:version","v8.18.0","v8.19.0"],"title":"[DOCS][8.x] Adds resolution info to known issue summary for MWs","number":227876,"url":"https://github.com/elastic/kibana/pull/227876","mergeCommit":{"message":"[DOCS][8.x] Adds resolution info to known issue summary for MWs (#227876)\n\n## Summary\n\nWith elastic/response-ops-team#320 being\nclosed, we need to update the known issue summary for the Maintenance\nWindow bug and doc the fix\n(#221702) as a fixed bug in\n8.18.3. Note that I also added the known issue summary to 8.18.2, as it\nwas previously missing.\n\n**Corresponding 9.x updates**:\nhttps://github.com//pull/227875\n\n## Previews\n- 8.18.0 known issues\n- 8.18.1 known issues\n- 8.18.2 known issues\n- 8.18.3 fixed bugs\n\n---------\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"51b597b301021e81297f34d6f96a936a94f2c892"}},"sourceBranch":"8.19","suggestedTargetBranches":["8.18"],"targetPullRequestStates":[{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227876","number":227876,"mergeCommit":{"message":"[DOCS][8.x] Adds resolution info to known issue summary for MWs (#227876)\n\n## Summary\n\nWith elastic/response-ops-team#320 being\nclosed, we need to update the known issue summary for the Maintenance\nWindow bug and doc the fix\n(#221702) as a fixed bug in\n8.18.3. Note that I also added the known issue summary to 8.18.2, as it\nwas previously missing.\n\n**Corresponding 9.x updates**:\nhttps://github.com//pull/227875\n\n## Previews\n- 8.18.0 known issues\n- 8.18.1 known issues\n- 8.18.2 known issues\n- 8.18.3 fixed bugs\n\n---------\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>","sha":"51b597b301021e81297f34d6f96a936a94f2c892"}}]}] BACKPORT--> Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
…tic#227875) ## Summary With elastic/response-ops-team#320 being closed, we need to update the known issue summary for the Maintenance Window bug and doc the fix (elastic#221702) as a fixed bug in 9.0.3. **Corresponding 8.x updates**: elastic#227876 ## Previews - [9.x known issues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues) - [9.0.3 fixed bugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes) --------- Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
…tic#227875) ## Summary With elastic/response-ops-team#320 being closed, we need to update the known issue summary for the Maintenance Window bug and doc the fix (elastic#221702) as a fixed bug in 9.0.3. **Corresponding 8.x updates**: elastic#227876 ## Previews - [9.x known issues](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes/known-issues) - [9.0.3 fixed bugs](https://docs-v3-preview.elastic.dev/elastic/kibana/pull/227875/release-notes#kibana-9.0.3-fixes) --------- Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
Currently we use a search with a
top_hitsaggregation to get the alerts filtered with the scoped queries of the active maintenance windows. But sincetop_hitsaggregation has a fixed limit of 100 hits we cannot use our max alerts limit to get all the alerts an execution can generate.This PR replaces
searchwithmsearchand removes the aggregation from the search query so we can use the maxAlerts limit for the response size.