oncall-engine/engine/apps
Joey Orlando 4d655dff60
modify check_escalation_finished_task task (#1266)
# What this PR does

This PR:
- modifies the `check_escalation_finished_task` celery task to:
  - do stricter escalation validation based on the alert group's
escalation snapshot (see the `audit_alert_group_escalation` method in
`engine/apps/alerts/tasks/check_escalation_finished.py` for the
validation logic)
- use a read-only database for querying alert-groups if one is
configured, otherwise use the "default" one
- ping a configurable heartbeat (new env var
`ALERT_GROUP_ESCALATION_AUDITOR_CELERY_TASK_HEARTBEAT_URL` added)
- increase the task frequency from every 10 to every 13 minutes (this
can be configured via an env variable)
  - adds public documentation on how to configure this auditor task
- modifies the local celery startup command to properly take into
consideration all celery related env vars (similar to the ones we use in
`engine/celery_with_exporter.sh`; this made it easier to enable `celery
beat` locally for testing)
- removes the following code:
- removes references to `AlertGroup.estimate_escalation_finish_time` and
marks the model field as deprecated using the [`django-deprecate-fields`
library](https://pypi.org/project/django-deprecate-fields/). This field
was only used for the previous version of this validation task
- `EscalationSnapshotMixin.calculate_eta_for_finish_escalation` was only
used to calculate the value for
`AlertGroup.estimate_escalation_finish_time`
  - `calculate_escalation_finish_time` celery task
  

## Which issue(s) this PR fixes

https://github.com/grafana/oncall-private/issues/1558

## Checklist

- [x] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated
2023-03-17 10:14:08 +00:00
..
alerts modify check_escalation_finished_task task (#1266) 2023-03-17 10:14:08 +00:00
api Add alert group filter by escalation chain (#1535) 2023-03-14 14:38:18 +00:00
api_for_grafana_incident Include alert details in Grafana Incident alert-group endpoint (#1280) 2023-02-03 13:43:21 +00:00
auth_token Change Organization Deleted/Moved Precedence (#1402) 2023-02-24 11:45:21 +00:00
base Inbound email integration (#837) 2023-03-16 13:59:21 +08:00
email Inbound email integration (#837) 2023-03-16 13:59:21 +08:00
grafana_plugin Check stack cluster for insight_logs (#1469) 2023-03-09 06:30:54 +00:00
heartbeat Add database migrations linter (#1020) 2023-02-06 16:01:37 +08:00
integrations Inbound email integration (#837) 2023-03-16 13:59:21 +08:00
mobile_app add unique idx on user column in mobileapp authtoken table (#1482) 2023-03-08 13:50:57 +01:00
oss_installation Add database migrations linter (#1020) 2023-02-06 16:01:37 +08:00
public_api Check for duplicated positions in TF escalation policies (#1554) 2023-03-16 11:48:11 +00:00
schedules Add support for web overrides to Terraform schedules (#1222) 2023-03-10 16:21:50 +00:00
slack update wording in some Slack messages which mention 'incident' instead of 'alert group' (#1565) 2023-03-16 16:43:49 +00:00
social_auth Rework slack login to check backend before redirecting (#1306) 2023-02-08 09:08:18 -03:00
telegram Refactor get_user_verbal_for_team_for_slack. (#809) 2023-03-07 10:09:37 +00:00
twilioapp Add database migrations linter (#1020) 2023-02-06 16:01:37 +08:00
user_management Store org cluster_slug (#1480) 2023-03-09 04:10:19 +00:00
webhooks Rework webhook trigger tasks checks and payload build (#1544) 2023-03-14 17:21:46 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00