Pipeline processing broken because of race condition
Recently merged !6650 (merged) 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.
For details see https://github.com/pluginaweek/state_machine/issues/191
We already had simiar problem that was solved in f68acbac.
MR with the fix: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6736
/cc @ayufan @dzaporozhets