elementary icon indicating copy to clipboard operation
elementary copied to clipboard

[ELE-1259] [ELE-1260] Alerts - Group by table format is not a valid attachment (not always)

Open IDoneShaveIt opened this issue 2 years ago • 0 comments

Describe the bug When running edr monitor with --group-by table, a user is getting the error Could not post message to slack via webhook - <WEBHOOK>. Error: invalid_attachments. When sending the alerts without the group by option, everything is working.

The meaning of that is that there is a bug in the group by table formatting.

Additional context User thread: https://elementary-community.slack.com/archives/C02CTC89LAX/p1686486783767019 The broken alert format that is generated:

{"text": null, "attachments": [{"blocks": [{"type": "section", "text": {"type": "mrkdwn", "text": "*RAW_MARTS.CLOUD.raw_dim_stacks*"}}, {"type": "section", "text": {"type": "mrkdwn", "text": "*Tags*: _No tags_"}}, {"type": "section", "text": {"type": "mrkdwn", "text": "*Owners*: _No owners_"}}, {"type": "section", "text": {"type": "mrkdwn", "text": "*Subscribers*: _No subscribers_"}}, {"type": "section", "text": {"type": "mrkdwn", "text": "\t"}}, {"type": "section", "text": {"type": "mrkdwn", "text": "*Model errors*"}}, {"type": "divider"}, {"type": "context", "elements": [{"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}, {"type": "mrkdwn", "text": "*Result message*"}]}, {"type": "section", "text": {"type": "mrkdwn", "text": "```Database Error in model raw_dim_stacks (models/raw_marts/cloud/raw_dim_stacks.sql)\n  000904 (42000): SQL compilation error: error line 78 at position 4\n  invalid identifier 'LDS.GITHUB_PULL_REQUEST_TEMPLATE'\n  compiled Code at target/run/pulumi_dwh/models/raw_marts/cloud/raw_dim_stacks.sql```"}}]}], "blocks": [{"type": "header", "text": {"type": "plain_text", "text": "🔺 Table issues detected - raw_dim_stacks"}}, {"type": "context", "elements": [{"type": "mrkdwn", "text": ":X: Model errors: 27    |"}]}, {"type": "divider"}]}

From SyncLinear.com | ELE-1259

IDoneShaveIt avatar Jul 09 '23 09:07 IDoneShaveIt