Fix runner eternal loop when update job result
What does this MR do?
This is a quick fix for the recent incident that a few GitLab runners stuck at eternal loop.
There was a bug in a state machine logic in Ci::Build
. In a rare condition, deployment cannot update its status with drop
method, thus build.drop!
kept failing.
What are the relevant issue numbers?
Close https://gitlab.com/gitlab-org/gitlab-ce/issues/56518
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - [-] Documentation created/updated via this MR
- [-] Documentation reviewed by technical writer or follow-up review issue created
-
Tests added for this feature/bug - [-] Tested in all supported browsers
-
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides - [-] Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.
-
Security reports checked/validated by reviewer
Edited by Shinya Maeda