8000 notification/slack: update existing messages with status by mastercactapus · Pull Request #2004 · target/goalert · GitHub
[go: up one dir, main page]

Skip to content

notification/slack: update existing messages with status - #2004

Merged
mastercactapus merged 16 commits into
masterfrom
slack-message-updates
Nov 3, 2021
Merged

mastercactapus merged 16 commits into
masterfrom
slack-message-updates

Conversation

@mastercactapus
Copy link
Copy Markdown
Member

Description:
This PR updates the Slack notifier to include a color bar with alert messages and update the existing message instead of posting status updates in-thread.

Unacked alerts will have a red bar and details included:
unacked

Acked alerts will reflect the latest log entry, a yellow bar, and retain details:
acked

When escalated, the alert summary and link is broadcast to the channel:
escalated

When closed, details of the alert is hidden, bar turns green, and the link remains with the last log entry:
closed

Lanithane
Lanithane previously approved these changes Nov 1, 2021
@Lanithane Lanithane left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a personal preference, I think it could look a bit cleaner without the nested quote line for the details- LGTM!

@mastercactapus
Copy link
Copy Markdown
Member Author

@forfold Maybe we can try tweaking it during the two-way interaction work; we'll be changing the rendering logic for that into its final state. I added it so it would stand out since there's no pre-processing for markdown -> slack markdown, but I agree the double color-bar isn't ideal.

@Lanithane
Copy link
Copy Markdown
Contributor

@mastercactapus That sounds good! Yeah I definitely don't think something like that should hold us back, so it has my approval :)

@Lanithane
Copy link
Copy Markdown
Contributor

It could be neat to have a button to show the full details (rendered with mkdwn) as a modal within Slack

@dctalbot dctalbot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, but seeing some odd behavior...

I created an alert with a summary of "test", and got the following -

Native notification on mac is missing preview:
Screen Shot 2021-11-02 at 2 03 46 PM

There is a stray greater than symbol in the message body:
Screen Shot 2021-11-02 at 2 06 20 PM

It only goes away if I close the alert.

@mastercactapus
mastercactapus merged commit d923d5e into master Nov 3, 2021
@mastercactapus
mastercactapus deleted the slack-message-updates branch November 3, 2021 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0