Slack Notifications Notify that Cancelled Pipelines are Failed
Summary
This is issue is created from a response on a bug reported by a Bronze Customer:
https://gitlab.zendesk.com/agent/tickets/156543 (internal):
When I have the following options enabled in Settings > CI / CD > General pipelines
Auto-cancel redundant, pending pipelines-
Skip outdated deployment jobsDeployments get automatically cancelled when a new deployment was issued before the first one is complete. This is a super cool feature, but has the following problem with your Slack integration:
Whenever a deployment gets cancelled we get a red Deploy to staging failed error message in Slack which is confusing as the deployment itself didn't fail - it was aborted automatically.
Expected behaviour (one of the two):
- I don't get any message at all for cancelled / skipped deployments.
- I get a yellow warning message that the deployment was cancelled because a more recent deployment was issued.
The error message is very misleading and annoying as one cannot just tell from within Slack what happened.
Steps to reproduce
Use Slack Notifications and have the following options enabled in Settings > CI / CD > General pipelines
Auto-cancel redundant, pending pipelinesSkip outdated deployment jobs
Example Project
What is the current bug behavior?
Slack Notification says the deployment is "failed" although it is only "cancelled"
What is the expected correct behavior?
Slack Notification says the deployment is "cancelled" when it is "cancelled"
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)