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

Search doesn't work in Alert Groups page #3030

Closed
marganellim opened this issue Sep 16, 2023 · 14 comments
Closed

Search doesn't work in Alert Groups page #3030

marganellim opened this issue Sep 16, 2023 · 14 comments
Labels

Comments

@marganellim
Copy link

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

image

How do we reproduce it?

  1. On the Alert Groups page, type a search string into the search text box
  2. 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

@marganellim marganellim added the bug Something isn't working label Sep 16, 2023
@ToonTijtgat2
Copy link

+1

@ToonTijtgat2
Copy link

For our setup, the search function never adapted table with the search value.

@Matvey-Kuk
Copy link
Contributor

We're going to update this part of the product (including search) soon: #2853

@marganellim
Copy link
Author

marganellim commented Sep 27, 2023

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.

@marganellim
Copy link
Author

Search is still not working with version 1.3.44

@marganellim
Copy link
Author

Still looking to see if there's an update with this issue.

@vdombrovski
Copy link

Can confirm, search still broken in v1.3.86.

From the code, the relevant search function is implemented here:

queryset = queryset.annotate(

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)

@marganellim
Copy link
Author

Bumping this issue. Is there any resolution coming to the search function?

@joeyorlando
Copy link
Contributor

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 []
   ...

@ToonTijtgat2
Copy link

@joeyorlando thanks for sharing the reason.
Is there a plan to activate it again?

@joeyorlando
Copy link
Contributor

@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)

@joeyorlando
Copy link
Contributor

closing as duplicate of #2232

@joeyorlando joeyorlando closed this as not planned Won't fix, can't repro, duplicate, stale Mar 6, 2024
@marganellim
Copy link
Author

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?

@joeyorlando
Copy link
Contributor

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 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants