From 0421bc472a4e9e8e56cf1d8f93e5316586bde294 Mon Sep 17 00:00:00 2001 From: Yulya Artyukhina Date: Tue, 19 Dec 2023 07:05:57 +0100 Subject: [PATCH] Fix posting slack message about ratelimits (#3582) # What this PR does ## Which issue(s) this PR fixes https://github.com/grafana/oncall-private/issues/2374 ## Checklist - [ ] 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) --- CHANGELOG.md | 1 + engine/apps/integrations/tasks.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0b487ef..29d012db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Check reason to skip notification in Slack to avoid task perform_notification retries @Ferril ([#3562](https://github.com/grafana/oncall/pull/3562)) - Fix alert group table columns validation @Ferril ([#3577](https://github.com/grafana/oncall/pull/3577)) +- Fix posting message about rate limit to Slack @Ferril ([#3582](https://github.com/grafana/oncall/pull/3582)) ## v1.3.80 (2023-12-14) diff --git a/engine/apps/integrations/tasks.py b/engine/apps/integrations/tasks.py index 476e9c58..4ce84c2e 100644 --- a/engine/apps/integrations/tasks.py +++ b/engine/apps/integrations/tasks.py @@ -169,6 +169,6 @@ def notify_about_integration_ratelimit_in_slack(organization_id, text, **kwargs) if slack_team_identity is not None: try: sc = SlackClient(slack_team_identity, enable_ratelimit_retry=True) - sc.chat_postMessage(channel=organization.general_log_channel_id, text=text, team=slack_team_identity) + sc.chat_postMessage(channel=organization.general_log_channel_id, text=text) except SlackAPIError as e: logger.warning(f"Slack exception {e} while sending message for organization {organization_id}")