Commit d9915e28 authored by Tyler Amos's avatar Tyler Amos

Remove the additional_repo_storage_by_namespace FF

Removes the feature flag definition yml file as well as references to
the feature flag.
parent 133fa2a8
<script> <script>
/**
* project_with_excess_storage.vue component is rendered behind
* `additional_repo_storage_by_namespace` feature flag. The component
* looks similar to project.vue component so that once the flag is
* lifted this component could replace and be used mainstream.
*/
import { GlLink, GlIcon, GlTooltipDirective } from '@gitlab/ui'; import { GlLink, GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue'; import ProjectAvatar from '~/vue_shared/components/project_avatar/default.vue';
......
...@@ -378,7 +378,6 @@ module EE ...@@ -378,7 +378,6 @@ module EE
def additional_repo_storage_by_namespace_enabled? def additional_repo_storage_by_namespace_enabled?
!::Feature.enabled?(:namespace_storage_limit, self) && !::Feature.enabled?(:namespace_storage_limit, self) &&
::Feature.enabled?(:additional_repo_storage_by_namespace, self) &&
::Gitlab::CurrentSettings.automatic_purchased_storage_allocation? ::Gitlab::CurrentSettings.automatic_purchased_storage_allocation?
end end
......
---
title: Remove the additional_repo_storage_by_namespace feature flag
merge_request: 49055
author:
type: other
---
name: additional_repo_storage_by_namespace
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43188
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/255166
milestone: '13.5'
type: development
group: group::fulfillment
default_enabled: false
...@@ -21,32 +21,39 @@ RSpec.describe ProjectsController do ...@@ -21,32 +21,39 @@ RSpec.describe ProjectsController do
subject { get :show, params: { namespace_id: public_project.namespace.path, id: public_project.path } } subject { get :show, params: { namespace_id: public_project.namespace.path, id: public_project.path } }
context 'additional repo storage by namespace' do context 'additional repo storage by namespace' do
using RSpec::Parameterized::TableSyntax
let(:namespace) { public_project.namespace } let(:namespace) { public_project.namespace }
where(:automatic_purchased_storage_allocation, :additional_repo_storage_by_namespace, :expected_to_render) do before do
true | true | true allow_next_instance_of(EE::Namespace::RootExcessStorageSize) do |root_storage|
true | false | false allow(root_storage).to receive(:usage_ratio).and_return(0.5)
false | true | false allow(root_storage).to receive(:above_size_limit?).and_return(true)
false | false | false end
stub_feature_flags(namespace_storage_limit: false)
namespace.add_owner(user)
end end
with_them do context 'when automatic_purchased_storage_allocation setting is enabled' do
before do before do
allow_next_instance_of(EE::Namespace::RootExcessStorageSize) do |root_storage| stub_application_setting(automatic_purchased_storage_allocation: true)
allow(root_storage).to receive(:usage_ratio).and_return(0.5) end
allow(root_storage).to receive(:above_size_limit?).and_return(true)
end
stub_application_setting(automatic_purchased_storage_allocation: automatic_purchased_storage_allocation)
stub_feature_flags(additional_repo_storage_by_namespace: additional_repo_storage_by_namespace, namespace_storage_limit: false)
namespace.add_owner(user) it 'includes the CTA for additional purchased storage' do
subject
expect(response.body).to match(/Please purchase additional storage/)
end
end
context 'when automatic_purchased_storage_allocation setting is disabled' do
before do
stub_application_setting(automatic_purchased_storage_allocation: false)
end end
it do it 'does not include the CTA for additional purchased storage' do
subject subject
expect(response.body.include?("Please purchase additional storage")).to eq(expected_to_render) expect(response.body).not_to match(/Please purchase additional storage/)
end end
end end
end end
......
...@@ -111,8 +111,8 @@ describe('Storage counter app', () => { ...@@ -111,8 +111,8 @@ describe('Storage counter app', () => {
}); });
}); });
describe('with additional_repo_storage_by_namespace feature flag', () => { describe('with additional_repo_storage_by_namespace feature', () => {
it('usage_graph component hidden is when flag is false', async () => { it('usage_graph component hidden is when feature is false', async () => {
wrapper.setData({ wrapper.setData({
namespace: withRootStorageStatistics, namespace: withRootStorageStatistics,
}); });
...@@ -124,7 +124,7 @@ describe('Storage counter app', () => { ...@@ -124,7 +124,7 @@ describe('Storage counter app', () => {
expect(findStorageInlineAlert().exists()).toBe(false); expect(findStorageInlineAlert().exists()).toBe(false);
}); });
it('usage_statistics component is rendered when flag is true', async () => { it('usage_statistics component is rendered when feature is true', async () => {
createComponent({ createComponent({
additionalRepoStorageByNamespace: true, additionalRepoStorageByNamespace: true,
namespace: withRootStorageStatistics, namespace: withRootStorageStatistics,
......
...@@ -1790,23 +1790,16 @@ RSpec.describe Namespace do ...@@ -1790,23 +1790,16 @@ RSpec.describe Namespace do
subject { namespace.additional_repo_storage_by_namespace_enabled? } subject { namespace.additional_repo_storage_by_namespace_enabled? }
where(:namespace_storage_limit, :additional_repo_storage_by_namespace, :automatic_purchased_storage_allocation, :result) do where(:namespace_storage_limit, :automatic_purchased_storage_allocation, :result) do
false | false | false | false false | false | false
false | false | true | false false | true | true
false | true | false | false true | false | false
true | false | false | false true | true | false
false | true | true | true
true | true | false | false
true | false | true | false
true | true | true | false
end end
with_them do with_them do
before do before do
stub_feature_flags( stub_feature_flags(namespace_storage_limit: namespace_storage_limit)
namespace_storage_limit: namespace_storage_limit,
additional_repo_storage_by_namespace: additional_repo_storage_by_namespace
)
stub_application_setting(automatic_purchased_storage_allocation: automatic_purchased_storage_allocation) stub_application_setting(automatic_purchased_storage_allocation: automatic_purchased_storage_allocation)
end 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