From c00fde606ee2d8f87a13c801efc3278396f6bb7f Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 7 Nov 2017 23:47:50 +0800 Subject: Make sure all pipelines would go to pending once Without this fix, pipeline could go from skipped to running directly, bypassing the transition for: [:created, :pending] => :running And this is responsible for setting up started_at. Without this fix, started_at would never be set. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/39884 --- app/models/ci/pipeline.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index fcbe3d2b67b..19814864e50 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -66,8 +66,8 @@ module Ci state_machine :status, initial: :created do event :enqueue do - transition created: :pending - transition [:success, :failed, :canceled, :skipped] => :running + transition [:created, :skipped] => :pending + transition [:success, :failed, :canceled] => :running end event :run do -- cgit v1.2.1