Commit 48df27a7 authored by Vladimir Shushlin's avatar Vladimir Shushlin Committed by Vladimir Shushlin

Limit number of files per pages site

Remove pages_limit_entries_count feature flag

It's tested in prod and enabled for everyone

Changelog: added
parent 855457e2
...@@ -294,8 +294,6 @@ module Projects ...@@ -294,8 +294,6 @@ module Projects
end end
def pages_file_entries_limit def pages_file_entries_limit
return 0 unless Feature.enabled?(:pages_limit_entries_count, project, default_enabled: :yaml)
project.actual_limits.pages_file_entries project.actual_limits.pages_file_entries
end end
end end
......
---
name: pages_limit_entries_count
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64925/diffs
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/334765
milestone: '14.1'
type: development
group: group::release
default_enabled: false
...@@ -156,13 +156,6 @@ RSpec.describe Projects::UpdatePagesService do ...@@ -156,13 +156,6 @@ RSpec.describe Projects::UpdatePagesService do
expect(GenericCommitStatus.last.description).to eq("pages site contains 3 file entries, while limit is set to 2") expect(GenericCommitStatus.last.description).to eq("pages site contains 3 file entries, while limit is set to 2")
end end
it 'does not limit pages file count if feature is disabled' do
stub_feature_flags(pages_limit_entries_count: false)
create(:plan_limits, :default_plan, pages_file_entries: 2)
expect(execute).to eq(:success)
end
it 'removes pages after destroy' do it 'removes pages after destroy' do
expect(PagesWorker).to receive(:perform_in) expect(PagesWorker).to receive(:perform_in)
expect(project.pages_deployed?).to be_falsey expect(project.pages_deployed?).to be_falsey
......
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