Skip to content

Make pipeline failure Slack notifications prettier and more informative

What does this MR do?

Improves Slack pipeline status notifications. Here are examples of the cases this MR handles:

Pipeline Failure (1 failed job) image
Pipeline Failure (13 failed jobs) image

Note: Since taking this screenshot, I've lowered the maximum threshold to 10, so the and X more text will actually show when at least 11 jobs fail.

Pipeline Failure (2 failed stages) image
Pipeline Failure (YAML error) image
Pipeline success image
Pipeline success (with warnings) image

Some additional edge cases:

Really long job names (Job names are currently not truncated in any way.)

image

Really long stage names (Stage names are currently not truncated in any way.)

image

Really long branch name (Branch names are currently not truncated in any way.)

image

Really long commit messages Only the first line of the commit message is shown. This message is truncated if it exceeds 100 characters.

image

Current state

Just for reference, here is what a pipeline failure notification currently looks like:

image

EE port

https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/12635

It appears this port is no longer needed.

Feature flag

This MR hides its changes behind a feature flag named fancy_pipeline_slack_notifications. The feature flag is enabled by default.

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Closes #32495 (closed)

Edited by Nathan Friend

Merge request reports