-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Fix search issue with Alert search bar #155796
Conversation
Pinging @elastic/actionable-observability (Team: Actionable Observability) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@benakansara thanks for investigating this. This was introduced by #154680. Removing this prop might break functionality introduced in that PR. Best to check with @Zacqary. |
@CoenWarmer that's right. The search bar is shared by other applications too, I didn't take that into account. Then this needs more investigation. |
at a second look, I think the change only applies to the alert search bar in Observability Alerts and APM Services -> Alerts. @maryam-saeidi do you know if this component is used elsewhere? @Zacqary can we safely remove |
I added it there because if a user changes the query and clicks directly on the save button it doesn't save the new value. |
How can I verify if the new value is set correctly? I tested after removing |
It's not happening on the "Alerts" page but on the new alerts filter query input. I think the same search component is used in the both components. On Alerts page it's used as a search bar (as it is developed for) but on actions tab of a rule it's used as a query input box... |
@benakansara Places where we have an alert search bar are:
|
@ersin-erdal I didn't understand where you are referring to, where is
|
@ersin-erdal tbh, I couldn't see any difference in actions tab of a rule after removing @maryam-saeidi I think actions tab of a rule refers to the Security rules - |
let me quote my self :)
1- Create and save a rule with alerts filter query, It doesn't save the value as we set the new value in the redux store onBlur. Kind of race condition, Save event happens before onBlur. Please see the comment on this PR I think we need a separate onChange function on action details to pass the value to redux store. It can be removed from the "Alerts" page. |
Thank you for the explanation @ersin-erdal.
I think we are talking about same thing (adding |
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.
Tested in Observability app. Works as expected 🥳
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.
Nice job! 👍🏻
@benakansara You don't need to use |
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.
Tested and works with Conditional Action
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @benakansara |
Fixes elastic#155655 Added `onQuerySubmit` ~as optional~ parameter to `AlertsSearchBar` and made `onQueryChange` as optional parameter as this is not needed for Observability Alerts. ### [Observability] Alerts page: https://user-images.githubusercontent.com/69037875/234622864-c18e338c-2ea3-4c79-9340-30c5e8fa470e.mov ### [Security] Alerts filter in action: https://user-images.githubusercontent.com/69037875/234623243-c882a866-83fa-4d09-a1fb-d36588922f30.mov (cherry picked from commit 44c40a3)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.8`: - [Fix search issue with Alert search bar (#155796)](#155796) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Bena Kansara","email":"69037875+benakansara@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-05-02T18:34:29Z","message":"Fix search issue with Alert search bar (#155796)\n\nFixes #155655 `onQuerySubmit` ~as optional~ parameter to `AlertsSearchBar` and\r\nmade `onQueryChange` as optional parameter as this is not needed for\r\nObservability Alerts.\r\n\r\n### [Observability] Alerts page:\r\n\r\n\r\nhttps://user-images.githubusercontent.com/69037875/234622864-c18e338c-2ea3-4c79-9340-30c5e8fa470e.mov\r\n\r\n### [Security] Alerts filter in action:\r\n\r\n\r\nhttps://user-images.githubusercontent.com/69037875/234623243-c882a866-83fa-4d09-a1fb-d36588922f30.mov","sha":"44c40a38e7dafe566823f56edb167d6b3b17a6f3","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","impact:high","Team: Actionable Observability","v8.8.0","v8.9.0"],"number":155796,"url":"#155796 search issue with Alert search bar (#155796)\n\nFixes #155655 `onQuerySubmit` ~as optional~ parameter to `AlertsSearchBar` and\r\nmade `onQueryChange` as optional parameter as this is not needed for\r\nObservability Alerts.\r\n\r\n### [Observability] Alerts page:\r\n\r\n\r\nhttps://user-images.githubusercontent.com/69037875/234622864-c18e338c-2ea3-4c79-9340-30c5e8fa470e.mov\r\n\r\n### [Security] Alerts filter in action:\r\n\r\n\r\nhttps://user-images.githubusercontent.com/69037875/234623243-c882a866-83fa-4d09-a1fb-d36588922f30.mov","sha":"44c40a38e7dafe566823f56edb167d6b3b17a6f3"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"#155796 search issue with Alert search bar (#155796)\n\nFixes #155655 `onQuerySubmit` ~as optional~ parameter to `AlertsSearchBar` and\r\nmade `onQueryChange` as optional parameter as this is not needed for\r\nObservability Alerts.\r\n\r\n### [Observability] Alerts page:\r\n\r\n\r\nhttps://user-images.githubusercontent.com/69037875/234622864-c18e338c-2ea3-4c79-9340-30c5e8fa470e.mov\r\n\r\n### [Security] Alerts filter in action:\r\n\r\n\r\nhttps://user-images.githubusercontent.com/69037875/234623243-c882a866-83fa-4d09-a1fb-d36588922f30.mov","sha":"44c40a38e7dafe566823f56edb167d6b3b17a6f3"}}]}] BACKPORT--> Co-authored-by: Bena Kansara <69037875+benakansara@users.noreply.github.com>
Fixes #155655
Added
onQuerySubmit
as optionalparameter toAlertsSearchBar
and madeonQueryChange
as optional parameter as this is not needed for Observability Alerts.[Observability] Alerts page:
Screen.Recording.2023-04-26.at.17.17.55.mov
[Security] Alerts filter in action:
Screen.Recording.2023-04-26.at.17.14.58.mov