oncall-engine/engine/apps
Matias Bordese ac01dd173d
Improve user permissions query (#3291)
The query for checking a user permission (used to get users from a Slack
usergroup, for example) is timing out (and generating retries, besides
affecting some use cases:
[logs](https://ops.grafana-ops.net/explore?panes=%7B%22FCQ%22:%7B%22datasource%22:%22c-R8UWvVk%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bnamespace%3D%5C%22amixr-prod%5C%22,%20cluster%3D%5C%22prod-us-central-0%5C%22%7D%20%7C%3D%20%5C%22Timeout%20exceeded%20in%20regular%20expression%20match.%5C%22%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22c-R8UWvVk%22%7D,%22editorMode%22:%22code%22%7D%5D,%22range%22:%7B%22from%22:%22now-6h%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1)):

`django.db.utils.OperationalError: (3699, 'Timeout exceeded in regular
expression match.')`

Change to a `contains` query except for SQLite (not supported), where a
simplified version of the original regex query is used.
2023-11-07 16:58:16 +00:00
..
alerts Add a command to continue escalations for alert groups (#3283) 2023-11-07 13:44:23 +00:00
api add get_cached_oncall_users_for_multiple_schedules method + add DELETE /alertgroups/<id> internal API endpoint (#3280) 2023-11-06 15:30:32 -05:00
api_for_grafana_incident Add render_for_web information to alert group incident API (#3005) 2023-09-12 12:02:42 +00:00
auth_token Return API URL as part of status (#2791) 2023-08-22 17:17:26 +00:00
base WIP: Direct paging improvements (#3064) 2023-09-28 03:57:49 +00:00
email Minor formatting changes (#2641) 2023-07-26 14:45:44 +01:00
grafana_plugin Add labels implementation for integration (#3014) 2023-10-20 07:30:11 +00:00
heartbeat Check if organization was deleted for heartbeat integration (#3270) 2023-11-03 17:05:37 +00:00
integrations Fixing ratelimit texts 2023-09-27 14:18:00 +03:00
labels Alert group labels filter (#3238) 2023-11-06 10:31:12 +00:00
metrics_exporter Fix metrics and dashboard (#2895) 2023-08-29 13:52:24 +00:00
mobile_app Fix db migration for mobile app (#3260) 2023-11-02 16:40:26 +00:00
oss_installation Minor formatting changes (#2641) 2023-07-26 14:45:44 +01:00
phone_notifications Re-enable a few mypy rules + fix existing errors (#2725) 2023-08-03 09:43:03 +00:00
public_api Move cache clear to fixtures, fix some deprecation notices (#3269) 2023-11-06 16:52:50 +00:00
schedules Update test to avoid failure depending on when it is run (#3289) 2023-11-07 13:29:46 +00:00
slack Improve user permissions query (#3291) 2023-11-07 16:58:16 +00:00
social_auth Upgrade to django 4.2.6 and other deps updates (#3176) 2023-10-27 18:45:00 +00:00
telegram Fix getting alert group from telegram action (#3262) 2023-11-03 10:22:38 +00:00
twilioapp add missing db migrations + add additional backend db migration check to CI (#3234) 2023-10-31 16:00:55 -04:00
user_management Improve user permissions query (#3291) 2023-11-07 16:58:16 +00:00
webhooks Limit number of times webhooks retry (#3244) 2023-11-02 17:56:12 +00:00
zvonok add missing db migrations + add additional backend db migration check to CI (#3234) 2023-10-31 16:00:55 -04:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00