oncall-engine/engine/apps/slack/tests
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
..
tasks fix slack API rate limit errors in send_message_to_thread_if_bot_not_in_channel task (#3803) 2024-01-31 13:42:52 -05:00
test_scenario_steps Support stack header from chatops-proxy (#4578) 2024-07-19 10:08:52 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
conftest.py Fix handling Slack rate limits (#2991) 2023-09-07 11:25:29 +00:00
factories.py Pass all integration labels down to alert groups (#3302) 2023-11-08 14:04:58 +00:00
test_installation.py Unified Slack app reinstall (#4682) 2024-07-19 11:53:06 +00:00
test_interactive_api_endpoint.py chore: grafana-irm command (#4762) 2024-07-31 11:50:07 +00:00
test_parse_slack_usernames.py Schedules alpha fixes (#541) 2022-09-21 11:19:59 +01:00
test_populate_slack_channels.py Improve Slack error handling (#3000) 2023-09-12 09:49:16 +00:00
test_reset_slack.py Handle None role when syncing users from Grafana (#3147) 2023-10-19 17:39:08 +00:00
test_slack_client.py Update Slack user group for a schedule - handle paid_team_only Slack API error (#4793) 2024-08-09 14:51:01 +00:00
test_slack_formatter.py Fix alert group rendering (#3424) 2023-11-24 15:39:37 +00:00
test_slack_message.py Update deep link URL for Slack messages (#4317) 2024-05-09 10:18:48 +00:00
test_slack_renderer.py Show incident button first when alert group is acknowledged (#4642) 2024-07-10 15:01:01 +00:00
test_slash_command.py chore: grafana-irm command (#4762) 2024-07-31 11:50:07 +00:00
test_user_group.py Update Slack user group for a schedule - handle paid_team_only Slack API error (#4793) 2024-08-09 14:51:01 +00:00
test_utils.py Fix post message to slack channel (#3701) 2024-01-17 13:05:36 +00:00