From 293eff23251fb8719996c662f6bcdbdde54986af Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Tue, 5 Sep 2023 13:06:22 +0200 Subject: [PATCH] fix slack-sdk issue (#2969) Screenshot 2023-09-05 at 12 59 16 [logs](https://ops.grafana-ops.net/explore?panes=%7B%22FZ0%22:%7B%22datasource%22:%22000000193%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bcluster%3D~%5C%22%28prod-us-central-0%7Cprod-eu-west-0%7Cops-us-east-0%29%5C%22,%20namespace%3D~%5C%22amixr-%28staging%7Cprod%29%5C%22%7D%20%7C%3D%20%60KeyError%28%27cursor%27%60%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22000000193%22%7D,%22editorMode%22:%22code%22%7D%5D,%22range%22:%7B%22from%22:%22now-6h%22,%22to%22:%22now%22%7D%7D%7D&schemaVersion=1&orgId=1) --- CHANGELOG.md | 6 ++++++ engine/apps/slack/tasks.py | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f656d6fc..6f8e68e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## v1.3.34 (2023-09-05) + +### Fixed + +- Fix issue in `apps.slack.tasks.populate_slack_channels_for_team` task by @joeyorlando ([#2969](https://github.com/grafana/oncall/pull/2969)) + ## v1.3.33 (2023-09-05) ### Fixed diff --git a/engine/apps/slack/tasks.py b/engine/apps/slack/tasks.py index ca746e31..d669be75 100644 --- a/engine/apps/slack/tasks.py +++ b/engine/apps/slack/tasks.py @@ -540,11 +540,9 @@ def populate_slack_channels_for_team(slack_team_identity_id: int, cursor: Option response, cursor, rate_limited = sc.paginated_api_call_with_ratelimit( "conversations_list", paginated_key="channels", - json={ - "types": "public_channel,private_channel", - "limit": 1000, - "cursor": cursor, - }, + types="public_channel,private_channel", + limit=1000, + cursor=cursor, ) except SlackAPITokenException as e: logger.info(f"token revoked\n{e}")