Skip Danger failure when package-and-test is being created
What does this MR do and why?
The package-and-test execution is required for merge requests targeting
stable branches. Danger should fail when the package-and-test status is
canceled or manual, or when the pipeline is not present. Previous to
this commit there was a bug in the logic: Danger failed when the
package-and-test pipeline was being created, because it
only considered the downstream pipeline status and ignored the bridge status
This commit ensures both statuses, from the bridge and the downstream pipeline, are considered, avoiding the Danger failure when the package-and-test is being created.
Related to gitlab-com/gl-infra/delivery#2839 (closed)
Screenshots or screen recordings
| Before | After (Tested on https://gitlab.com/gitlab-org/gitlab/-/jobs/3872987847) |
|---|---|
![]() |
![]() |
package-and-test pipeline manual check
There are three different Danger behaviors regarding the package-and-test execution:
-
Message: If the MR contains application changes, Danger includes a message guiding the execution of the
package-and-testpipeline (this is regardless of thepackage-and-teststatus) -
Warning: Danger warns engineers that the
package-and-testpipeline should succeed or failures should be reviewed by a SET. This only happens if thepackage-and-testpipeline did not succeed -
Failure: Danger fails if the
package-and-testis eithercanceledormanual
Examples:
| Message | Warning | Failure |
|---|---|---|
![]() |
![]() |
![]() |
Summarizing by status:
| Status | Danger fails? | Danger job | Danger error | Danger warning? | Danger section? |
|---|---|---|---|---|---|
Bridge created - No downstream pipeline |
No | Example | No | Yes | Yes |
running |
No | Example | No | Yes | Yes |
success 1
|
No | No | No | Yes | |
failed |
No | Example | No | Yes | Yes |
canceled |
Yes | Example | Yes | No | Yes |
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
-
I was not able to test the
successstatus because thepackage-and-testpipeline is currently failing.↩




