WIP: Avoid duplicate bridge status update
What does this MR do?
Related to #207234 (closed) (post-regression issue)
Related to #198354 (closed) (original issue)
Related to #202239 (closed) (related issue)
Scenario: Let's consider a pipeline that is triggered by a bridge job. The same pipeline can have downstream pipelines subscribed to it (new feature) so they get triggered any time the pipeline completes. When the pipeline completes we run Ci::PipelineBridgeStatusService
(on EE::Ci::Pipeline
). The PipelineBridgeStatusService
does not have a guard clause to only run if the bridge is dependent
(like using strategy:depend
in the CI yaml) and can cause status updates on the upstream bridge even if the bridge does not dependent.
Fix: Add guard clause to PipelineBridgeStatusService
to avoid it updating bridge status regardless.
Goal
The goal is to avoid the following errors from being reported: https://sentry.gitlab.net/gitlab/gitlabcom/?query=transaction%3A%22Sidekiq%2FCi%3A%3ACreateCrossProjectPipelineWorker%22&statsPeriod=14d
In the Sentry report we the fact that PipelineBridgeStatusService
runs anyway updates the bridge status to failed
. Then the CreateCrossProjectPipelineService
also tries to fail the bridge but it's already failed.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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