oncall-engine/engine/apps/slack
Joey Orlando 93c92a7a4c
Update Slack user group for a schedule - handle paid_team_only Slack API error (#4793)
# What this PR does

Semi-related to https://github.com/grafana/oncall-private/issues/2131

Addresses occasional task failures for
`apps.slack.tasks.update_slack_user_group_for_schedules` when trying to
update a Slack user group for a non-paid Slack account. [Slack's
documentation](https://slack.com/help/articles/212906697-Create-a-user-group)
mentions this is a paid only feature, hence the error
([logs](https://ops.grafana-ops.net/goto/-AWfsrrIR?orgId=1) from an
actual task):
```
2024-08-08 16:20:36,613 source=engine:celery worker=ForkPoolWorker-16 task_id=6bdaae94-1552-4b6d-93e2-e2fa0bae57b1 task_name=apps.slack.tasks.update_slack_user_group_for_schedules name=apps.slack.models.slack_usergroup level=WARNING Slack usergroup S06LW5GJ88Z update failed: Slack API error! Response: {'ok': False, 'error': 'paid_teams_only'}
```

Updated our docs on our Slack integration to emphasize that this feature
_only_ works for paid Slack accounts

## 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-08-09 14:51:01 +00:00
..
migrations Unified Slack app reinstall (#4682) 2024-07-19 11:53:06 +00:00
models Update Slack user group for a schedule - handle paid_team_only Slack API error (#4793) 2024-08-09 14:51:01 +00:00
representatives cleanup CustomButton backend code + add ngrok/express outgoing webhook e2e test (#2544) 2024-03-28 15:37:22 +00:00
scenarios Stop posting new slack log reports (#4750) 2024-07-29 12:16:36 +00:00
tests Update Slack user group for a schedule - handle paid_team_only Slack API error (#4793) 2024-08-09 14:51:01 +00:00
types Introduce slash command matcher (#4717) 2024-07-24 09:53:06 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
alert_group_slack_service.py Do not retry on SlackAPICantUpdateMessageError errors (#4405) 2024-05-28 17:46:15 +00:00
chatops_proxy_routing.py Prepare OnCall for Unified Slack App (#4232) 2024-06-03 09:07:10 +00:00
client.py Update when slack client ratelimit retry handler is enabled (#3447) 2023-11-30 12:35:46 +00:00
constants.py Truncate resolution note text in slack message to satisfy block limits (#3351) 2023-11-16 13:15:04 +00:00
errors.py Update Slack user group for a schedule - handle paid_team_only Slack API error (#4793) 2024-08-09 14:51:01 +00:00
installation.py Unified Slack app reinstall (#4682) 2024-07-19 11:53:06 +00:00
slack_formatter.py Fix alert group rendering (#3424) 2023-11-24 15:39:37 +00:00
slash_command.py chore: grafana-irm command (#4762) 2024-07-31 11:50:07 +00:00
tasks.py Stop posting new slack log reports (#4750) 2024-07-29 12:16:36 +00:00
test_slack_message.py Don't send request for permalink if slack token has been revoked (#4777) 2024-08-06 15:34:08 +00:00
urls.py Make Slack URLs work without trailing slashes (#4607) 2024-07-03 15:55:54 +00:00
utils.py attempt to address some SlackAPIRatelimitError exceptions (#3820) 2024-02-01 14:47:12 -05:00
views.py Introduce slash command matcher (#4717) 2024-07-24 09:53:06 +00:00