Bad interaction of needs and allow_failure keywords.

Summary

When job B depends on job A with the needs keyword, and job A is marked as allow_failure, job B is run even if job A failed. Contrary to #31673 (closed), I can't see any obvious workaround to this issue.

Steps to reproduce

Example minimalistic configuration:

stages:
  - first
  - second

foo:
  stage: first
  script: exit 1
  allow_failure: true

foobar:
  stage: first
  script: exit 0

bar:
  stage: second
  script: exit 1
  needs:
    - foo

and resulting pipeline: https://gitlab.com/Zimmi48/test-ci-bug/pipelines/83883101

Screenshot_2019-09-23_Pipeline___Théo_Zimmermann_test-ci-bug

Example Project

https://gitlab.com/Zimmi48/test-ci-bug

What is the current bug behavior?

Job B is run.

What is the expected correct behavior?

Job B should not run

Output of checks

This bug happens on GitLab.com

Edited Mar 27, 2023 by Furkan Ayhan
Assignee Loading
Time tracking Loading