Skip to content

Fix stuck bridge jobs when downstream project is invalid

Furkan Ayhan requested to merge 331703-fix-stuck-multiprojects into master

What does this MR do?

This MR fixes stuck bridge jobs when the downstream project is invalid.

We normally try to handle this in Ci::CreateDownstreamPipelineService but the code doesn't reach there since we make the bridge job stuck in the "pending" state.

In this MR, we don't check the existence of the project in the model. We pass this logic into the worker that already does.

Related to #331703 (closed)

Note: We also have the same problem for "mirroring the status from an upstream pipeline", however, I'll create another MR for that.

Screenshots or Screencasts (strongly suggested)

test:
  script: exit 0

deploy:
  trigger:
    project: my/invalid-project

Before:

Screen_Shot_2021-08-17_at_15.57.37

After:

Screen_Shot_2021-08-17_at_15.51.30

Screen_Shot_2021-08-17_at_15.57.21

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • 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