diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2016-10-10 16:39:51 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2016-10-10 16:39:51 +0300 |
commit | 359b4f9a0303e3b55004c7d4d6cacc1ef8e6e25f (patch) | |
tree | 65768e15d53f001467c23c25831ee2aea67cc335 /app/services/ci/process_pipeline_service.rb | |
parent | f5576b16baa7e6717a380566049235ee6ce40b05 (diff) | |
parent | 904de2d64b1b63a82cfba92e02b6c25ff94b725b (diff) |
Merge branch 'fix/async-pipeline-processing-stale-data' into 'master'
Fix ci pipeline processing with async jobs
## What does this MR do?
This MR fixes CI pipeline processing with asynchronous jobs called from `around_transition` provided by state machine.
For details see https://github.com/pluginaweek/state_machine/issues/191 and commit f68acba.
## Why was this MR needed?
Recently merged https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6650 introduced problem with asynchronous job being deployed when `around_transition` still held transaction, which caused race condition that prevented pipeline status to change in a proper way.
## What are the relevant issue numbers?
Closes #23111
See merge request !6736
Diffstat (limited to 'app/services/ci/process_pipeline_service.rb')
-rw-r--r-- | app/services/ci/process_pipeline_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/ci/process_pipeline_service.rb b/app/services/ci/process_pipeline_service.rb index 36c93dddadb..d3dd30b2588 100644 --- a/app/services/ci/process_pipeline_service.rb +++ b/app/services/ci/process_pipeline_service.rb @@ -16,6 +16,8 @@ module Ci process_stage(index) end + @pipeline.update_status + # Return a flag if a when builds got enqueued new_builds.flatten.any? end |