summaryrefslogtreecommitdiff
path: root/app/models/pages
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-17 15:10:15 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-17 15:10:15 +0000
commit68c476dbd8a2c670aeeebffce8b63b554a3ac7f0 (patch)
treec46b90a5c131d8e8d7fb530f1b8f9390b8eb2613 /app/models/pages
parenta62238de7302e54edafa3407a2dc8ba1a5f96e4d (diff)
downloadgitlab-ce-68c476dbd8a2c670aeeebffce8b63b554a3ac7f0.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/pages')
-rw-r--r--app/models/pages/lookup_path.rb9
-rw-r--r--app/models/pages/virtual_domain.rb4
2 files changed, 5 insertions, 8 deletions
diff --git a/app/models/pages/lookup_path.rb b/app/models/pages/lookup_path.rb
index bd4b232849f..17131cd736d 100644
--- a/app/models/pages/lookup_path.rb
+++ b/app/models/pages/lookup_path.rb
@@ -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
diff --git a/app/models/pages/virtual_domain.rb b/app/models/pages/virtual_domain.rb
index 90cb8253b52..497f67993ae 100644
--- a/app/models/pages/virtual_domain.rb
+++ b/app/models/pages/virtual_domain.rb
@@ -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