Merge branch 'fix-pipeline-schedule-owner-is-nil' into 'master'
Fix pipeline schedule when owner is nil Closes gitlab-com/gl-infra/production#805 and #63086 See merge request gitlab-org/gitlab-ce!29477
This commit is contained in:
commit
74850f1f8e
|
@ -7,7 +7,7 @@ module Ci
|
||||||
# Otherwise, multiple pipelines could be created in a short interval.
|
# Otherwise, multiple pipelines could be created in a short interval.
|
||||||
schedule.schedule_next_run!
|
schedule.schedule_next_run!
|
||||||
|
|
||||||
RunPipelineScheduleWorker.perform_async(schedule.id, schedule.owner.id)
|
RunPipelineScheduleWorker.perform_async(schedule.id, schedule.owner&.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fix pipeline schedules when owner is nil
|
||||||
|
merge_request:
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -24,5 +24,13 @@ describe Ci::PipelineScheduleService do
|
||||||
|
|
||||||
subject
|
subject
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when owner is nil' do
|
||||||
|
let(:schedule) { create(:ci_pipeline_schedule, project: project, owner: nil) }
|
||||||
|
|
||||||
|
it 'does not raise an error' do
|
||||||
|
expect { subject }.not_to raise_error
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue