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

[Actionable observability] Alerts page - Fix page goes blank with invalid query input #143641

Closed
Tracked by #134886
maryam-saeidi opened this issue Oct 19, 2022 · 1 comment · Fixed by #145259
Closed
Tracked by #134886
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.6.0

Comments

@maryam-saeidi
Copy link
Member

maryam-saeidi commented Oct 19, 2022

📝 Summary

When an invalid input such as { is entered in query input, it will cause the page to goes into blank:

Screen-Recording-2022-10-19-at-1.51.15-PM.mp4

Another query to reproduce the error, suggested by @CoenWarmer here:

host.cpu.usage >= "25%"""

✅ Acceptance Criteria

  • Fix the above-mentioned issue by making sure the input in the search bar is valid before attempting to get the related alerts from ES.

💡Implementation hint

@Kerry350 already found a way to fix this issue for the logs' search bar, this fix can be found in this PR

@maryam-saeidi maryam-saeidi added bug Fixes for quality problems that affect the customer experience Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.6.0 labels Oct 19, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@maryam-saeidi maryam-saeidi changed the title [Actionable observability] Fix alerts page goes blank with invalid query input [Actionable observability] Alerts page - Fix page goes blank with invalid query input Oct 19, 2022
@maryam-saeidi maryam-saeidi self-assigned this Nov 13, 2022
maryam-saeidi added a commit that referenced this issue Nov 14, 2022
…query string (#145067)

Implements #143641

## 📝 Summary
Fixes the alerts page crash when a wrong query is entered in the search
bar query string.


![image](https://user-images.githubusercontent.com/12370520/201547177-b9d78bfe-545c-455a-b120-3455f8196607.png)

**Note**
I am working on tests but I will create a separate PR for that.

## 🧪 How to test
- Go to alerts / rule details page
- Enter an invalid query such as `{`, page should not crash and you
should see a toast with a related error message

Co-authored-by: kibanamachine <[email protected]>
maryam-saeidi added a commit that referenced this issue Nov 16, 2022
Closes #143641

## Summary

As a follow-up to this PR #145067,
in this PR I've added tests to make sure the same issue will not happen
in the future.

### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants