Skip to content

Fix resetting upstream bridge to allow subsequent jobs to run [RUN ALL RSPEC] [RUN AS-IF-FOSS]

What does this MR do?

Here we are changing the implementation done in !41930 (merged).

When resetting an upstream bridge, we don't care about the subsequent skipped jobs that may be skipped because of the failed bridge.

In this MR, we fix it. Related to #297678 (closed)

It is behind a feature flag ci_reset_bridge_with_subsequent_jobs #329194 (closed).

Screenshots (strongly suggested)

Example CI files:

# .gitlab-ci.yml

stages: [test, deploy, post_deploy]

test:
  stage: test
  script: sleep 2

deploy:
  stage: deploy
  trigger:
    include: 'child.yml'
    strategy: depend

post_deploy:
  stage: post_deploy
  script: sleep 15
# child.yml

test:
  script:
    - sleep 15
    - exit $(($RANDOM % 2))

Before this MR

The downstream pipeline fails, so our bridge fails

old-failed

We restart the downstream job "test"

"post_deploy" stays "skipped".

old-reset

The upstream "post_deploy" remains the same

old-success

After this MR

The downstream pipeline fails, so our bridge fails

new-failed

We restart the downstream job "test"

"post_deploy" transitions to "created" state.

new-reset

The upstream "post_deploy" starts running

new-running-subsequent

Result

new-success

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
Edited by Furkan Ayhan

Merge request reports

Loading