Commit 0852bacf authored by Matija Čupić's avatar Matija Čupić

Retry pipelines in the background

Changelog: changed
parent 782924b0
......@@ -176,11 +176,7 @@ class Projects::PipelinesController < Projects::ApplicationController
end
def retry
if Gitlab::Ci::Features.background_pipeline_retry_endpoint?(@project)
::Ci::RetryPipelineWorker.perform_async(pipeline.id, current_user.id) # rubocop:disable CodeReuse/Worker
else
pipeline.retry_failed(current_user)
end
respond_to do |format|
format.html do
......
---
name: background_pipeline_retry_endpoint
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61270
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/330915
milestone: '13.12'
type: development
group: group::pipeline authoring
default_enabled: false
......@@ -41,10 +41,6 @@ module Gitlab
def self.gldropdown_tags_enabled?
::Feature.enabled?(:gldropdown_tags, default_enabled: :yaml)
end
def self.background_pipeline_retry_endpoint?(project)
::Feature.enabled?(:background_pipeline_retry_endpoint, project)
end
end
end
end
......@@ -878,19 +878,6 @@ RSpec.describe Projects::PipelinesController do
expect(::Ci::RetryPipelineWorker).to have_received(:perform_async).with(pipeline.id, user.id)
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(background_pipeline_retry_endpoint: false)
end
it 'retries the pipeline without returning any content' do
post_retry
expect(response).to have_gitlab_http_status(:no_content)
expect(build.reload).to be_retried
end
end
context 'when builds are disabled' do
let(:feature) { ProjectFeature::DISABLED }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment