Skip to content

Scheduled pipeline config error is silently rescued

Errors generated when a scheduled pipeline with configuration errors are rescued without any thing logged which causes pipelines not to be triggered at all with no alert. In the case of scheduled specific jobs, this may not necessarily be caught at any other point

See https://gitlab.com/gitlab-org/gitlab-ee/issues/26893#note_215674214 for an example of this happening

  def run_pipeline_schedule(schedule, user)
    Ci::CreatePipelineService.new(schedule.project,
                                  user,
                                  ref: schedule.ref)
      .execute!(:schedule, ignore_skip_ci: true, save_on_errors: false, schedule: schedule)
  rescue Ci::CreatePipelineService::CreateError
    # no-op. This is a user operation error such as corrupted .gitlab-ci.yml.
  rescue => e
    error(schedule, e)
  end
Edited by Kyle Wiebers