oncall-engine/engine/apps/alerts
Joey Orlando a9155130df
update slack_sdk dependency to latest version (#2947)
# What this PR does

- update `slackclient` dependency to latest version. The version we were
using was 5 years old 😲
- first followed the v2 migration guide
[here](https://github.com/slackapi/python-slack-sdk/wiki/Migrating-to-2.x)
followed by the v3 migration guide
[here](https://slack.dev/python-slack-sdk/v3-migration/). The main
changes were:
    - The PyPI project was renamed from `slackclient` to `slack_sdk`
- it is discouraged/harder to call `api_call` and encouraged to call the
helper methods (ex. `chat_postMessage`;
[note](https://github.com/slackapi/python-slack-sdk/wiki/Migrating-to-2.x#web-client-api-changes)
in migration guide docs)
- In 1.x, a failed api call would return the error payload to you and
have you handle the error. In 2.x, a failed api call will throw an
exception. To handle this in your code, you will have to wrap api calls
with a try except block. Since we overload `WebClient.api_call` this was
an easy change and only required a one line change
- remove `apps.slack.slack_client.slack_server.SlackClientServer` class.
The new version of `slack_sdk` handles the case that we needed to
overload for in the first place.
- merged `apps/slack/slack_client/slack_client.py` and
`apps/slack/slack_client/exceptions.py` into `apps/slack/client.py`

## 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)
2023-09-05 11:31:59 +02:00
..
escalation_snapshot Fix build escalation snapshot (#2954) 2023-09-04 11:10:28 +00:00
grafana_alerting_sync_manager Alerting integration use get for receiver key (#2894) 2023-08-29 02:01:45 +00:00
incident_appearance remove some references to amixr (#2698) 2023-08-01 14:22:42 -04:00
incident_log_builder Shift Swap Requests in Slack + improve typing for Slack django app (#2653) 2023-07-28 15:11:38 +00:00
migrations Refactor AlertGroup.slack_message (#2957) 2023-09-04 18:03:18 +00:00
models Refactor AlertGroup.slack_message (#2957) 2023-09-04 18:03:18 +00:00
tasks update slack_sdk dependency to latest version (#2947) 2023-09-05 11:31:59 +02:00
tests update slack_sdk dependency to latest version (#2947) 2023-09-05 11:31:59 +02:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
constants.py OnCall prometheus metrics exporter (#1605) 2023-05-25 18:26:13 +00:00
integration_options_mixin.py AlertManager v2 (#2643) 2023-08-01 12:18:52 +08:00
paging.py Re-enable a few mypy rules + fix existing errors (#2725) 2023-08-03 09:43:03 +00:00
representative.py apps.get_model -> import (#2619) 2023-07-25 09:43:23 +00:00
signals.py Fix warnings when running backend tests (#2079) 2023-06-06 18:38:00 +00:00
utils.py remove deprecated call_ack_url celery task (#2545) 2023-07-25 02:50:18 -04:00