oncall-engine/engine
Dominik Broj 6da36b3c0b
Use autogenerated types for alert_receive_channels (#3851)
# What this PR does

- autogenerate new types exposed by backend, remove custom types that
duplicate autogenerated ones
- use autogenerated types for alert receive channels
- in alert_receive_channel model:
  - use autogenerate http client (`onCallApi`) for http requests
- extract methods that don't update state into
alert_receive_channel.helpers.ts and make them pure (they accept
AlertReceiveChannelStore as param) to avoid inconsistency and issues
with `this` binding
  - use `makeAutoObservable`
  - remove unneeded decorators
- rename update* methods to fetch* whenever such methods retrieve data
from backend with GET requests
- in other models use `@action.bound` for actions and arrow functions
for store methods that are not actions (in subsequent PRs we will apply
the same changes as in alert_receive_channel, this is just for now until
we do it)
- refactor http-client so that it shows global notification on http
errors automatically and provide the possibility to opt-out from it when
making a call
- improve type-safety of `GSelect`
- fix bug related to attaching alert group
(https://raintank-corp.slack.com/archives/C04JCU51NF8/p1707476487580579)

## Which issue(s) this PR fixes

https://github.com/grafana/oncall/issues/3331

## 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] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
2024-02-20 12:09:22 +00:00
..
apps Use autogenerated types for alert_receive_channels (#3851) 2024-02-20 12:09:22 +00:00
common Support prescribed labels (#3848) 2024-02-20 14:42:51 +08:00
config_integrations Improve template to handle empty group labels (#2794) 2023-08-17 07:52:05 +00:00
engine Add ability to migrate one org (#3809) 2024-02-01 18:25:36 +08:00
settings Allow setting email app to use SSL instead of TLS (#3911) 2024-02-20 03:38:09 -05:00
static/images remove django admin panel (#2731) 2023-08-02 14:26:50 -04: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 address occasional failing tests when run w/ pytest-xdist (#3840) 2024-02-06 11:57:54 -05:00
Dockerfile Revert "upgrade to Python 3.12 (#3456)" and "bump uwsgi version to latest #3466" (#3483) 2023-12-01 09:56:26 -05:00
manage.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
pyproject.toml patch occasional UnicodeEncodeError that occurs with outgoing webhooks (#3832) 2024-02-02 21:08:04 +00:00
requirements-dev.txt add pytest-xdist to speed up backend tests (#3839) 2024-02-05 16:04:15 -05:00
requirements.txt Bump django from 4.2.7 to 4.2.10 in /engine (#3853) 2024-02-08 08:36:17 -05:00
tox.ini address occasional failing tests when run w/ pytest-xdist (#3840) 2024-02-06 11:57:54 -05:00
uwsgi.ini Use Tilt for local development (#1396) 2023-09-07 19:38:19 +08: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