Commit 56ee8492 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'remove-pages-async-update-feature-flag' into 'master'

Remove async_update_pages_config feature flag

See merge request gitlab-org/gitlab!39984
parents 2164acac 1d989745
......@@ -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