Skip to content

Bug: "Allow failure" jobs are incorrectly marked as passed in pipeline summary

Summary

When a job is configured with allow_failure: true and the job fails, it is incorrectly shown as "passed" ( green checkmark) in the pipeline summary UI. However, when inspecting the job’s detailed view, the job status is correctly shown as failed (). This inconsistency can lead to misunderstanding the pipeline's true state.

Steps to reproduce

  1. In your .gitlab-ci.yml, create a job that is allowed to fail:

    test_job:
      script: exit 1
      allow_failure: true

Example Project

https://gitlab.com/ottrahugo/bug-test

What is the current bug behavior?

Jobs that fail but are marked with allow_failure: true are incorrectly shown as "passed" in the pipeline UI. This visual representation contradicts the job's actual result.

What is the expected correct behavior?

Jobs that are allowed to fail should be visually distinct from both passed and failed jobs. Historically, GitLab used a warning (⚠️) icon and a label such as “allowed to fail”. This clearly communicated that the failure occurred but was tolerated.

Relevant logs and/or screenshots

Pipeline overview:

image.png

image.png

Output of checks

<!-- This bug happens on GitLab.com --> <!-- /label ~"reproduced on GitLab.com" -->

Results of GitLab environment info

<!-- Not applicable - GitLab.com instance -->

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

<!-- Not applicable - GitLab.com instance -->

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

The UI logic for pipeline summary may be incorrectly interpreting allow_failure: true as "passed" rather than "tolerated failure". A UI fix may be needed to restore previous behavior (warning state).

Patch release information for backports

If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.

Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.

High-severity bug remediation

To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.

Edited by 🤖 GitLab Bot 🤖