-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RAM] add maintenance window banner #163516
[RAM] add maintenance window banner #163516
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
@mdefazio for you to be aware |
...test/functional_with_es_ssl/apps/triggers_actions_ui/rules_list/maintenance_window_banner.ts
Outdated
Show resolved
Hide resolved
...test/functional_with_es_ssl/apps/triggers_actions_ui/rules_list/maintenance_window_banner.ts
Outdated
Show resolved
Hide resolved
import { generateUniqueKey } from '../../../lib/get_test_data'; | ||
import { createMaintenanceWindow, createObjectRemover } from '../maintenance_windows/utils'; | ||
|
||
export default ({ getPageObjects, getService }: FtrProviderContext) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we might achieve the desired test confidence using a Jest test, which could run faster and might reduce flakiness. What do you think about considering a Jest test for this instead of an e2e test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just do it like that 7a89261 without too much complication and maybe avoid e2e test. what do you think?
Thanks for the heads up. Issue for improvements: #163497 |
Though https://github.com/elastic/kibana/blob/main/packages/kbn-alerts-ui-shared/src/maintenance_window_callout/index.tsx isn't included in this PR, IMO we can shorten the callout. For example, to "Rule notifications are stopped during the maintenance window". If you want me to add that change to this PR, lmk! |
…aue/kibana into RAM-add-maintenance-window-banner
...ns/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.test.tsx
Outdated
Show resolved
Hide resolved
…aue/kibana into RAM-add-maintenance-window-banner
it('should render an alerts page template', async () => { | ||
const wrapper = await setup(); | ||
expect(wrapper.getByTestId('alertsPage')).toBeInTheDocument(); | ||
await act(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird you need act here, maybe when can get through why you needed it when I come back
@guskovaue How can I test this feature locally? Update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I have some questions, but they are not blockers or even necessarily related to this PR.
As shown below, Alert 1
was created before the MW, Alert 2
was created during that time.
My questions are:
- Shouldn't we see the maintenance window for
Alert 1
too, how is the logic of making this decision? - What is the logic of showing the MW banner? Is it only shown during an MW is active?
- Is there a plan to make the MW clickable?
- If an MW is changed, how does it impact the existing alerts related to that MW?
- It seems it does not matter if the alert's rule has a connector and, actually any notification is impacted during that time window. Wouldn't it be better to add the MW to an alert only when a notification is impacted by that MW?
|
||
await act(async () => { | ||
const wrapper = await setup(); | ||
expect(await wrapper.findByText('Maintenance window is running')).toBeInTheDocument(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Wouldn't it be better to use data-test-subj
instead of finding an element with text?
We only show the window maintenance when has been created during a window maintenance.
Yes correct it will only show when a MW is active
there is an issue and discussion to improve the banner -> #163497
It does not, we only care that this alert has been created during a WM
you are correct, @shanisagiv1 do you think that we should do that? |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
expected head sha didn’t match current head ref. |
I think it's better to show the MW even when there are no set triggered actions. so users won't waste time investigating these alerts since it's not "actionable", and should be considered as false alarms |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @guskovaue |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Solves: elastic#163465 Add maintenance window banner to Rules list and Alerts list in O11y and Management. <img width="1334" alt="Screenshot 2023-08-09 at 13 03 50" src="https://github.com/elastic/kibana/assets/26089545/de0708b1-db2a-4517-91aa-a3d6b3e62b44"> <img width="1350" alt="Screenshot 2023-08-09 at 13 05 10" src="https://github.com/elastic/kibana/assets/26089545/9f7c488d-e992-4807-a60e-3c077b623b4e"> --------- Co-authored-by: Xavier Mouligneau <[email protected]> Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit b3122cb)
# Backport This will backport the following commits from `main` to `8.10`: - [[RAM] add maintenance window banner (#163516)](#163516) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-17T11:04:56Z","message":"[RAM] add maintenance window banner (#163516)\n\n## Summary\r\n\r\nSolves: https://github.com/elastic/kibana/issues/163465\r\n\r\nAdd maintenance window banner to Rules list and Alerts list in O11y and\r\nManagement.\r\n\r\n<img width=\"1334\" alt=\"Screenshot 2023-08-09 at 13 03 50\"\r\nsrc=\"https://github.com/elastic/kibana/assets/26089545/de0708b1-db2a-4517-91aa-a3d6b3e62b44\">\r\n\r\n<img width=\"1350\" alt=\"Screenshot 2023-08-09 at 13 05 10\"\r\nsrc=\"https://github.com/elastic/kibana/assets/26089545/9f7c488d-e992-4807-a60e-3c077b623b4e\">\r\n\r\n---------\r\n\r\nCo-authored-by: Xavier Mouligneau <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"b3122cb65670929eb5e274d8eba61bc17ca2af4f","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","ui-copy","v8.10.0","v8.11.0"],"number":163516,"url":"https://github.com/elastic/kibana/pull/163516","mergeCommit":{"message":"[RAM] add maintenance window banner (#163516)\n\n## Summary\r\n\r\nSolves: https://github.com/elastic/kibana/issues/163465\r\n\r\nAdd maintenance window banner to Rules list and Alerts list in O11y and\r\nManagement.\r\n\r\n<img width=\"1334\" alt=\"Screenshot 2023-08-09 at 13 03 50\"\r\nsrc=\"https://github.com/elastic/kibana/assets/26089545/de0708b1-db2a-4517-91aa-a3d6b3e62b44\">\r\n\r\n<img width=\"1350\" alt=\"Screenshot 2023-08-09 at 13 05 10\"\r\nsrc=\"https://github.com/elastic/kibana/assets/26089545/9f7c488d-e992-4807-a60e-3c077b623b4e\">\r\n\r\n---------\r\n\r\nCo-authored-by: Xavier Mouligneau <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"b3122cb65670929eb5e274d8eba61bc17ca2af4f"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/163516","number":163516,"mergeCommit":{"message":"[RAM] add maintenance window banner (#163516)\n\n## Summary\r\n\r\nSolves: https://github.com/elastic/kibana/issues/163465\r\n\r\nAdd maintenance window banner to Rules list and Alerts list in O11y and\r\nManagement.\r\n\r\n<img width=\"1334\" alt=\"Screenshot 2023-08-09 at 13 03 50\"\r\nsrc=\"https://github.com/elastic/kibana/assets/26089545/de0708b1-db2a-4517-91aa-a3d6b3e62b44\">\r\n\r\n<img width=\"1350\" alt=\"Screenshot 2023-08-09 at 13 05 10\"\r\nsrc=\"https://github.com/elastic/kibana/assets/26089545/9f7c488d-e992-4807-a60e-3c077b623b4e\">\r\n\r\n---------\r\n\r\nCo-authored-by: Xavier Mouligneau <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"b3122cb65670929eb5e274d8eba61bc17ca2af4f"}},{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia <[email protected]>
Summary
Solves: #163465
Add maintenance window banner to Rules list and Alerts list in O11y and Management.