-
Notifications
You must be signed in to change notification settings - Fork 283
[MAIN-2678] Fixing missing slack sink workload #1705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,7 @@ def handle_notification_grouping(self, finding: Finding, platform_enabled: bool) | |
| investigate_uri = self.get_timeline_uri(self.account_id, self.cluster_name) | ||
| finding_data = finding.attribute_map | ||
| # The top level entity name (the owner of the pod etc) | ||
| finding_data["workload"] = finding.service.name if finding.service else None | ||
| finding_data["workload"] = finding.service.name if finding.service else finding.backup_workload_name | ||
|
||
| finding_data["cluster"] = self.cluster_name | ||
| resolved = finding.title.startswith("[RESOLVED]") | ||
|
|
||
|
|
@@ -112,19 +112,13 @@ def __replace_callback_with_string(self, slack_message, block_id, message_string | |
| blocks[i] = { | ||
| "type": "section", | ||
| "block_id": block_id, | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": message_string | ||
| } | ||
| "text": {"type": "mrkdwn", "text": message_string}, | ||
| } | ||
| break | ||
|
|
||
| # Call the shorter update function | ||
| return self.slack_sender.update_slack_message( | ||
| channel=channel_id, | ||
| ts=message_ts, | ||
| blocks=blocks, | ||
| text=message_string | ||
| channel=channel_id, ts=message_ts, blocks=blocks, text=message_string | ||
| ) | ||
|
|
||
| except Exception as e: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.