Commit 1d989745 authored by Sean McGivern's avatar Sean McGivern

Remove async_update_pages_config feature flag

Removing this flag means that all updates to Pages configuration will
happen in Sidekiq, none in Puma.
parent 77e1d308
......@@ -249,11 +249,7 @@ class PagesDomain < ApplicationRecord
return if usage_serverless?
return unless pages_deployed?
if Feature.enabled?(:async_update_pages_config, project)
run_after_commit { PagesUpdateConfigurationWorker.perform_async(project_id) }
else
Projects::UpdatePagesConfigurationService.new(project).execute
end
run_after_commit { PagesUpdateConfigurationWorker.perform_async(project_id) }
end
# rubocop: enable CodeReuse/ServiceClass
......
......@@ -144,11 +144,7 @@ module Projects
def update_pages_config
return unless project.pages_deployed?
if Feature.enabled?(:async_update_pages_config, project)
PagesUpdateConfigurationWorker.perform_async(project.id)
else
Projects::UpdatePagesConfigurationService.new(project).execute
end
PagesUpdateConfigurationWorker.perform_async(project.id)
end
def changing_pages_https_only?
......
---
name: async_update_pages_config
introduced_by_url:
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/230695
group: 'team::Scalability'
type: development
default_enabled: false
......@@ -354,16 +354,6 @@ RSpec.describe PagesDomain do
domain.destroy!
end
it 'delegates to Projects::UpdatePagesConfigurationService when not running async' do
stub_feature_flags(async_update_pages_config: false)
service = instance_double('Projects::UpdatePagesConfigurationService')
expect(Projects::UpdatePagesConfigurationService).to receive(:new) { service }
expect(service).to receive(:execute)
create(:pages_domain, project: project)
end
it "schedules a PagesUpdateConfigurationWorker" do
expect(PagesUpdateConfigurationWorker).to receive(:perform_async).with(project.id)
......
......@@ -412,32 +412,6 @@ RSpec.describe Projects::UpdateService do
subject
end
context 'when `async_update_pages_config` is disabled' do
before do
stub_feature_flags(async_update_pages_config: false)
end
it 'calls Projects::UpdatePagesConfigurationService when pages are deployed' do
project.mark_pages_as_deployed
expect(Projects::UpdatePagesConfigurationService)
.to receive(:new)
.with(project)
.and_call_original
subject
end
it "does not update pages config when pages aren't deployed" do
project.mark_pages_as_not_deployed
expect(Projects::UpdatePagesConfigurationService)
.not_to receive(:new)
subject
end
end
end
context 'when updating #pages_https_only', :https_pages_enabled do
......
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