oncall-engine/engine
Joey Orlando 34a90134fb
patch default user notification policy changes + fix failing e2e test (#4635)
# What this PR does

This is a follow-up PR to https://github.com/grafana/oncall/pull/4628.
As @Ferril pointed out, there was a slight issue in
`apps.alerts.tasks.notify_user.perform_notification` method when using a
"fallback"/default user notification policy. This is because the
`log_record_pk` arg passed into `perform_notification` will fetch the
`UserNotificationPolicyLogRecord` object, but that object will have a
`notification_policy` set to `None` (because there's no persistent
`UserNotificationPolicy` object to refer to).

Instead we now pass in a second argument to `perform_notification`,
`use_default_notification_policy_fallback`. If this is true, simply grab
the transient/in-memory `UserNotificationPolicy` and use that inside of
this task

Related to https://github.com/grafana/oncall/issues/4410

## 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-07-09 11:23:53 -04:00
..
apps patch default user notification policy changes + fix failing e2e test (#4635) 2024-07-09 11:23:53 -04:00
common don't force create default user notification policies (#4608) 2024-07-05 15:08:17 -04:00
config_integrations Fix docs and UI for connecting Grafana Alerting from other stack (#4243) 2024-04-24 08:02:51 +00:00
engine add exotel call provider (#4433) 2024-06-06 06:19:02 +00:00
settings Add tilt button to run pytest, fix local dev config for pytest, minor improvements to til (#3927) 2024-07-09 01:24:18 +00:00
static/images Update resolution note message shortcut instruction (#4482) 2024-06-07 13:54:45 +00:00
type_stubs/icalendar continue addressing mypy violations (#2170) 2023-06-27 10:23:08 +00:00
.dockerignore One startup command to rule them all (#760) 2022-11-07 16:34:43 +01:00
.gitignore modify push notification settings + use fcm-django library (#998) 2022-12-20 12:41:34 +01:00
celery_with_exporter.sh Add flag to debug logs (#912) 2022-11-29 11:16:42 +08:00
conftest.py Refactor how RBAC enabled/disabled status is determined for Grafana Cloud stacks (#4279) 2024-05-14 16:30:16 +00:00
Dockerfile bump uwsgi to 2.0.26 + Python to 3.12.3 (#4495) 2024-06-10 15:33:37 -04:00
grpcio-1.64.1-cp312-cp312-linux_aarch64.whl bump uwsgi to 2.0.26 + Python to 3.12.3 (#4495) 2024-06-10 15:33:37 -04:00
manage.py Instrument requests lib (#4008) 2024-03-05 05:22:34 +00:00
pyproject.toml Update out of office task to not retry on HttpError (#4328) 2024-05-09 16:16:46 +00:00
requirements-dev.in bump uwsgi to 2.0.26 + Python to 3.12.3 (#4495) 2024-06-10 15:33:37 -04:00
requirements-dev.txt update sqlparse to address CVE-2024-4340 (#4516) 2024-06-13 09:08:50 -04:00
requirements.in bump uwsgi to 2.0.26 + Python to 3.12.3 (#4495) 2024-06-10 15:33:37 -04:00
requirements.txt update sqlparse to address CVE-2024-4340 (#4516) 2024-06-13 09:08:50 -04:00
tox.ini temporarily don't parallelize tests 2024-06-11 11:53:06 -04:00
uwsgi.ini Remove explicit request size limits (#3878) 2024-02-22 15:00:33 +00:00
wait_for_test_mysql_start.sh Revert "Revert "speed up ci builds from 15 to <7 minutes"" (#1643) 2023-03-28 09:34:03 +02:00