Skip to content

Implement support of allow_failure keyword for CI rules

Furkan Ayhan requested to merge 30235-support-allow-failure-for-ci-rules into master

What does this MR do?

This MR will add the support of allow_failure keyword to CI-rules. (#30235 (closed))


This MR also creates a workaround for the issue #39534 (closed)

Normally, using when: manual sets allow_failure: true by default. However, with rules, there is not such behavior.

We now allow this usage so the behavior should continue in a way.

job:
  script: "echo Hello, Rules!"
  rules:
    - if: CONDITION
      when: manual
      allow_failure: true

After reading this discussion:

#34077 (comment 283372379)

So I think we're saying the same thing, that the current default is confusing, and the proposed change is more consistent.

But my point is that it would be a breaking change if we change the default, regardless confusing or not. It was this way for quite some time already, people might have written the pipeline and forgot it. It's not good to break existing pipelines.

It is a fair decision that we should not change the current behavior of rules:when:manual in a minor version. That's why we need to create a new issue or continue with the bug issue which needs to have 13.0 milestone.

I've also added some documentation about it. (It has TODO).

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Merge request reports