Skip to content
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

[Watcher] Fix search bug that crashes the app #162687

Merged
merged 4 commits into from
Aug 1, 2023

Conversation

sabarasaba
Copy link
Member

@sabarasaba sabarasaba commented Jul 28, 2023

Fixes #123071

Summary

The table config for the watcher list had a managed state for the search query that wasn't accounting for possible query errors (in our case, using special characters) causing the app to crash. Since it was unecessary for the query state to be managed, I removed that and we now have the default behaviour we have in other tables when these sort of errors happen.

Note to reviewers: in order to test this, just create a regular watcher and try typing or in the search and verify that the app doesnt crash and that the search box turns into error state.

Screenshot 2023-07-28 at 10 46 27

@sabarasaba sabarasaba added Feature:Watcher Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting v8.10.0 labels Jul 28, 2023
@sabarasaba sabarasaba self-assigned this Jul 28, 2023
@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
watcher 163.5KB 163.4KB -69.0B

History

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

cc @sabarasaba

@sabarasaba sabarasaba marked this pull request as ready for review July 28, 2023 11:41
@sabarasaba sabarasaba requested a review from a team as a code owner July 28, 2023 11:41
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

@sabarasaba sabarasaba changed the title [Watcher] Fix bug search bug that crashes the app [Watcher] Fix search bug that crashes the app Jul 30, 2023
@yuliacech yuliacech self-requested a review July 31, 2023 12:15
Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the fix, @sabarasaba!
Tested locally and the search doesn't crush the page anymore 👍
Code changes LGTM too, would be great to maybe also add a test for the bug if possible.

@sabarasaba sabarasaba merged commit 851f40c into elastic:main Aug 1, 2023
ThomThomson pushed a commit to ThomThomson/kibana that referenced this pull request Aug 1, 2023
@alisonelizabeth
Copy link
Contributor

@sabarasaba I think we need to take another look at this one and approach it differently. I re-enabled the watcher jest tests in #162592 and I see this test fails with your change. The list view is refreshed automatically, which causes the query to reset.

@alisonelizabeth
Copy link
Contributor

alisonelizabeth commented Aug 7, 2023

If you look at the EUI docs, the onChange callback will receive an error object (when applicable). I think you might be able to leverage that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Watcher release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Watcher Search Breaks when using Special Character
6 participants