oncall
oncall copied to clipboard
Search doesn't work in Alert Groups page
What went wrong?
What happened:
- When putting a search string into the search text box, the alert group table does not update with the search results
What did you expect to happen:
- In the previous version of the grafana on-call plugin, the search function would update the alert groups table with search results
How do we reproduce it?
- On the Alert Groups page, type a search string into the search text box
- Wait for Alert Groups to update with search results
Grafana OnCall Version
1.3.36
Product Area
Alert Flow & Configuration
Grafana OnCall Platform?
Other
User's Browser?
Brave
Anything else to add?
No response
+1
For our setup, the search function never adapted table with the search value.
We're going to update this part of the product (including search) soon: https://github.com/grafana/oncall/issues/2853
Is there any estimate on when the next rev will be released? The broken search is causing alot of headache with a client of ours.
Search is still not working with version 1.3.44
Still looking to see if there's an update with this issue.
Can confirm, search still broken in v1.3.86.
From the code, the relevant search function is implemented here:
https://github.com/grafana/oncall/blob/898d025d0982e0f3774d9e772745ffbc61cb66a9/engine/apps/public_api/views/alerts.py#L43
However, looking at the MySQL log, no CAST is actually sent as part of the SQL query, which means that maybe the search request parameter is not passed to the API as expected. (Django casts should be done on the DB-side).
MariaDB [(none)]> select * from mysql.general_log where argument like '%CAST%' \G;
Empty set (0.013 sec)
Bumping this issue. Is there any resolution coming to the search function?
This was temporarily disabled in #2101 for performance reasons. We are open to pull requests to conditionally enable this functionality under a feature flag! Something like this should get you started:
engine/apps/api/views/alert_group.py
class AlertGroupView:
...
search_fields = ["=public_primary_key", "=inside_organization_number", "web_title_cache"] if settings.FEATURE_ENABLE_ALERT_GROUP_SEARCH else []
...
@joeyorlando thanks for sharing the reason. Is there a plan to activate it again?
@ToonTijtgat2 eventually yes! But in the mean time, we're open to reviewing pull requests 😄 (the code snippet above gets you 90% of the way there)
closing as duplicate of #2232
Does the fact this has been closed as "not planned" indicate you have no plans to have a search function? Are you removing the search feature entirely?
No plans to remove the search functionality, simply doing some cleanup on our issues and closing this as a duplicate. Feel free to continue the conversation over there!
If you really would like to have this re-enabled, I proposed an potential approach for a PR in my comment above, that would allow users to opt-in to having this enabled (disabled by default). If you're willing to create a PR, I will help make sure it gets across the finish-line 😄