oncall-engine/engine/apps/api/views
Matias Bordese 845940d9b3
Update alert group search to force index in MySQL (#4731)
Related to https://github.com/grafana/oncall-private/issues/2679

Confirmed the query rewriting works via MySQL query logs (index is also
forced for the stats queries):

`2024-07-24T19:50:59.482751Z 3977 Query SELECT `alerts_alertgroup`.`id`
FROM `alerts_alertgroup` FORCE INDEX (`alert_group_list_index`) WHERE
(`alerts_alertgroup`.`channel_id` IN (13) AND (1) AND
(`alerts_alertgroup`.`public_primary_key` LIKE 'test' OR
`alerts_alertgroup`.`inside_organization_number` LIKE 'test' OR
`alerts_alertgroup`.`web_title_cache` LIKE '%test%') AND
`alerts_alertgroup`.`root_alert_group_id` IS NULL AND
((`alerts_alertgroup`.`silenced` = ('0') AND
`alerts_alertgroup`.`acknowledged` = ('0') AND
`alerts_alertgroup`.`resolved` = ('0')) OR
(`alerts_alertgroup`.`acknowledged` = ('1') AND
`alerts_alertgroup`.`resolved` = ('0'))) AND
`alerts_alertgroup`.`started_at` >= '2024-06-24 19:50:58' AND
`alerts_alertgroup`.`started_at` <= '2024-07-24 19:50:58') ORDER BY
`alerts_alertgroup`.`started_at` DESC LIMIT 26
`

Rewriting will only be applied to the alert group search queries, when
the feature flags are enabled. Dependency was already listed as a
requirement.
2024-07-25 09:21:32 +00:00
..
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
alert_group.py Update alert group search to force index in MySQL (#4731) 2024-07-25 09:21:32 +00:00
alert_group_table_settings.py Google OAuth2 flow + fetch Google Calendar OOO events (#4067) 2024-04-02 14:59:03 -04:00
alert_receive_channel.py Make it clear alert groups can't be searched (#4713) 2024-07-22 10:30:28 +00:00
alert_receive_channel_template.py Support alert routing based on labels (#3778) 2024-01-30 13:07:19 -05:00
alerts.py Add alert detail view (#385) 2022-08-19 14:03:07 +05:00
auth.py Prepare OnCall for Unified Slack App (#4232) 2024-06-03 09:07:10 +00:00
channel_filter.py Support alert routing based on labels (#3778) 2024-01-30 13:07:19 -05:00
escalation_chain.py Make it clear alert groups can't be searched (#4713) 2024-07-22 10:30:28 +00:00
escalation_policy.py Allow custom wait delay (#4446) 2024-06-03 13:06:47 +00:00
features.py Google Calendar Integration + automatic Shift Swap Request generation (#4220) 2024-04-15 12:56:28 +00:00
integration_heartbeat.py Add reset button to disable integration heartbeat (#3959) 2024-03-04 19:20:00 +00:00
labels.py Support prescribed labels (#3848) 2024-02-20 14:42:51 +08:00
live_setting.py Support alert routing based on labels (#3778) 2024-01-30 13:07:19 -05:00
on_call_shifts.py Support alert routing based on labels (#3778) 2024-01-30 13:07:19 -05:00
organization.py Add endpoint for organization config checks (#4204) 2024-04-11 14:51:56 +00:00
paging.py Let mobile use paging endpoint (#3619) 2024-01-08 12:18:39 +00:00
preview_template_options.py Fix of templates api behaviour for public and private api (#1408) 2023-03-01 16:32:15 +08:00
public_api_tokens.py Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
resolution_note.py Support alert routing based on labels (#3778) 2024-01-30 13:07:19 -05:00
route_regex_debugger.py remove references to AlertGroup.is_archived and AlertGroup.unarchived_objects (#2524) 2023-07-18 11:48:34 +00:00
schedule.py Make it clear alert groups can't be searched (#4713) 2024-07-22 10:30:28 +00:00
shift_swap.py Google Calendar Out of Office events - autogenerated shift swap requests (#4104) 2024-04-02 20:10:16 +00:00
slack_channel.py Support alert routing based on labels (#3778) 2024-01-30 13:07:19 -05:00
slack_team_settings.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
team.py Support alert routing based on labels (#3778) 2024-01-30 13:07:19 -05:00
telegram_channels.py Support alert routing based on labels (#3778) 2024-01-30 13:07:19 -05:00
user.py Make it clear alert groups can't be searched (#4713) 2024-07-22 10:30:28 +00:00
user_group.py Add endpoint to get a single user group (#4395) 2024-05-24 20:26:28 +00:00
user_notification_policy.py don't force create default user notification policies (#4608) 2024-07-05 15:08:17 -04:00
webhooks.py Make it clear alert groups can't be searched (#4713) 2024-07-22 10:30:28 +00:00