oncall-engine/engine/apps/webhooks
Michael Derynck d75590b943
Handle alert group deleted when task is already queued (#4230)
# What this PR does
- Since send_alert_create_signal is inside transaction on_commit we can
conclude that if it does not exist it was intentionally deleted before
the task could run and the task can exit instead of retrying
- Improve logging when send_alert_create_signal is called so both alert
and alert group are in the same line so you don't need to search the
logs as much
- Improve logging on public api delete alert group so we can know what
the alert group belonged to and the responsible user/org
- Remove distribute_alerts (Stopped using a while back, code should be
safe to remove now, no tasks running in system)

## Which issue(s) this PR closes

Closes https://github.com/grafana/oncall-private/issues/2640

<!--
*Note*: if you have more than one GitHub issue that this PR closes, be
sure to preface
each issue link with a [closing
keyword](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue).
This ensures that the issue(s) are auto-closed once the PR has been
merged.
-->

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
    show up in the autogenerated release notes.
2024-04-16 14:39:00 +00:00
..
migrations cleanup orphaned CustomButton escalation policy steps (#4143) 2024-04-02 15:23:07 +00:00
models Handle webhooks update on source integration settings update (#4195) 2024-04-10 11:37:11 +00:00
presets Allow OnCall API to use Grafana Service Accounts (#3189) 2023-11-23 16:42:27 +00:00
tasks fix incorrect args passed to apps.webhooks.tasks.trigger_webhook.execute_webhook (#4217) 2024-04-12 17:56:26 +00:00
tests fix incorrect args passed to apps.webhooks.tasks.trigger_webhook.execute_webhook (#4217) 2024-04-12 17:56:26 +00:00
__init__.py shift swap requests model + CRUD endpoints (#2597) 2023-07-21 19:35:19 +00:00
apps.py Webhooks trigger tasks on alert group events (#1533) 2023-03-13 21:19:22 +00:00
listeners.py Handle alert group deleted when task is already queued (#4230) 2024-04-16 14:39:00 +00:00
signals.py Add users_to_be_notified to new webhooks payload (#1798) 2023-04-20 16:13:48 +00:00
utils.py Handle webhooks update on source integration settings update (#4195) 2024-04-10 11:37:11 +00:00