Track transition error on concurrent bridge 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 that a bridge uses strategy:depend
to mirror the status of the downstream pipeline, and the downstream pipeline is dropped during the creation because of activity_limit_exceeded
. The downstream pipeline status transition to failed
triggers a status update on the bridge job asynchronously. The same occurs in Ci::CreateCrossProjectPipelineService#execute
when we check if the downstream pipeline failed to be created and we drop also the bridge job.
Fix: Rescue and track any possible state machine transition errors that can occur when updating the bridge job after a downstream pipeline is created. This is important to understand whether we have race conditions on bridge status updates. We expect race conditions to only occur for the same status transition.
- This change is a temporary stop-gap to avoid that the
Ci::CreateCrossProjectPipelineService
raises the exception and causes the worker to retry. - In a different MR we should define status updates only in one place to avoid concurrent status updates.
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