Commit 25ea3192 authored by Vladimir Shushlin's avatar Vladimir Shushlin Committed by Vladimir Shushlin

Remove pages_serve_from_legacy_storage feature flag

It's superseeded by Settings.pages.local_storage.enabled
parent 130d2e1c
......@@ -62,17 +62,16 @@ module Pages
}
end
# TODO: remove support for legacy storage in 14.3 https://gitlab.com/gitlab-org/gitlab/-/issues/328712
# we support this till 14.3 to allow people to still use legacy storage if something goes very wrong
# on self-hosted installations, and we'll need some time to fix it
def legacy_source
raise LegacyStorageDisabledError unless Feature.enabled?(:pages_serve_from_legacy_storage, default_enabled: true)
return unless ::Settings.pages.local_store.enabled
{
type: 'file',
path: File.join(project.full_path, 'public/')
}
rescue LegacyStorageDisabledError => e
Gitlab::ErrorTracking.track_exception(e, project_id: project.id)
nil
end
end
end
......@@ -21,9 +21,7 @@ module Pages
project.pages_lookup_path(trim_prefix: trim_prefix, domain: domain)
end
# TODO: remove in https://gitlab.com/gitlab-org/gitlab/-/issues/297524
# source can only be nil if pages_serve_from_legacy_storage FF is disabled
# we can remove this filtering once we remove legacy storage
# TODO: remove in https://gitlab.com/gitlab-org/gitlab/-/issues/328715
paths = paths.select(&:source)
paths.sort_by(&:prefix).reverse
......
---
title: Remove pages_serve_from_legacy_storage feature flag
merge_request: 60010
author:
type: added
---
name: pages_serve_from_legacy_storage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/297228
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/297524
milestone: '13.8'
type: development
group: group::release
default_enabled: true
......@@ -52,11 +52,8 @@ RSpec.describe Pages::LookupPath do
expect(source[:path]).to eq(project.full_path + "/public/")
end
it 'return nil when legacy storage is disabled and there is no deployment' do
stub_feature_flags(pages_serve_from_legacy_storage: false)
expect(Gitlab::ErrorTracking).to receive(:track_exception)
.with(described_class::LegacyStorageDisabledError, project_id: project.id)
.and_call_original
it 'return nil when local storage is disabled and there is no deployment' do
allow(Settings.pages.local_store).to receive(:enabled).and_return(false)
expect(source).to eq(nil)
end
......
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