Skip to content

Commit

Permalink
fix issue with slack_sdk call update (#2966)
Browse files Browse the repository at this point in the history
# What this PR does

## 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)
  • Loading branch information
joeyorlando authored Sep 5, 2023
1 parent 8e1962e commit 395977d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## v1.3.33 (2023-09-05)

### Fixed

- Fix issue in `apps.slack.tasks.post_or_update_log_report_message_task` task related to passing tuple to `text` arg
for `SlackClient.chat_postMessage` method by @joeyorlando ([#2966](https://github.com/grafana/oncall/pull/2966))

## v1.3.32 (2023-09-05)

### Added

- Add internal API endpoint for getting schedules shifts for current user by @Ferril([#2928](https://github.com/grafana/oncall/pull/2928))
- Add internal API endpoint for getting schedules shifts for current user by @Ferril ([#2928](https://github.com/grafana/oncall/pull/2928))

### Changed

Expand Down
6 changes: 3 additions & 3 deletions engine/apps/slack/scenarios/distribute_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -983,15 +983,15 @@ def post_log_message(self, alert_group: AlertGroup) -> None:
logger.info(f"Cannot post log message for alert_group {alert_group.pk} because SlackMessage doesn't exist")
return None

text = ("Building escalation plan... :thinking_face:",)

slack_log_message = alert_group.slack_log_message

if slack_log_message is None:
logger.debug(f"Start posting new log message for alert_group {alert_group.pk}")
try:
result = self._slack_client.chat_postMessage(
channel=slack_message.channel_id, thread_ts=slack_message.slack_id, text=text
channel=slack_message.channel_id,
thread_ts=slack_message.slack_id,
text="Building escalation plan... :thinking_face:",
)
except SlackAPITokenException as e:
print(e)
Expand Down

0 comments on commit 395977d

Please sign in to comment.