Commit c47966ab authored by Max Woolf's avatar Max Woolf

Merge branch '334889-clean-up-project-storage-feature-flag' into 'master'

Cleanup project_storage_ui feature flag

See merge request gitlab-org/gitlab!71270
parents 34b451be 0438d9d7
......@@ -2,7 +2,6 @@
class Projects::UsageQuotasController < Projects::ApplicationController
before_action :authorize_admin_project!
before_action :verify_usage_quotas_enabled!
layout "project_settings"
......@@ -20,10 +19,4 @@ class Projects::UsageQuotasController < Projects::ApplicationController
wiki_help_page_path: help_page_path('administration/wikis/index.md', anchor: 'reduce-wiki-repository-size')
}
end
private
def verify_usage_quotas_enabled!
render_404 unless Feature.enabled?(:project_storage_ui, project&.group, default_enabled: :yaml)
end
end
---
name: project_storage_ui
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68289
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/334889
milestone: '14.2'
type: development
group: group::utilization
default_enabled: false
......@@ -36,9 +36,8 @@ namespace to recalculate the storage.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68898) project-level graph in GitLab 14.4 [with a flag](../administration/feature_flags.md) named `project_storage_ui`. Disabled by default.
> - Enabled on GitLab.com in GitLab 14.4.
FLAG:
On self-managed GitLab, by default this feature is not available. To make it available, ask an administrator to [enable the feature flag](../administration/feature_flags.md) named `project_storage_ui`. On GitLab.com, this feature is available.
> - Enabled on self-managed in GitLab 14.5.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71270) in GitLab 14.5.
The following storage usage statistics are available to an owner:
......
......@@ -144,10 +144,6 @@ module Sidebars
end
def usage_quotas_menu_item
unless Feature.enabled?(:project_storage_ui, context.project&.group, default_enabled: :yaml)
return ::Sidebars::NilMenuItem.new(item_id: :usage_quotas)
end
::Sidebars::MenuItem.new(
title: s_('UsageQuota|Usage Quotas'),
link: project_usage_quotas_path(context.project),
......
......@@ -162,11 +162,6 @@ RSpec.describe Sidebars::Projects::Menus::SettingsMenu do
describe 'Usage Quotas' do
let(:item_id) { :usage_quotas }
describe 'with project_storage_ui feature flag enabled' do
before do
stub_feature_flags(project_storage_ui: true)
end
specify { is_expected.not_to be_nil }
describe 'when the user does not have access' do
......@@ -175,14 +170,5 @@ RSpec.describe Sidebars::Projects::Menus::SettingsMenu do
specify { is_expected.to be_nil }
end
end
describe 'with project_storage_ui feature flag disabled' do
before do
stub_feature_flags(project_storage_ui: false)
end
specify { is_expected.to be_nil }
end
end
end
end
......@@ -22,11 +22,6 @@ RSpec.describe 'Project Usage Quotas' do
end
describe 'GET /:namespace/:project/usage_quotas' do
context 'with project_storage_ui feature flag enabled' do
before do
stub_feature_flags(project_storage_ui: true)
end
it 'renders usage quotas path' do
mock_storage_app_data = {
project_path: project.full_path,
......@@ -51,13 +46,4 @@ RSpec.describe 'Project Usage Quotas' do
it_behaves_like 'response with 404 status'
end
end
context 'with project_storage_ui feature flag disabled' do
before do
stub_feature_flags(project_storage_ui: false)
end
it_behaves_like 'response with 404 status'
end
end
end
......@@ -119,7 +119,7 @@ RSpec.shared_context 'project navbar structure' do
_('Repository'),
_('CI/CD'),
_('Monitor'),
(s_('UsageQuota|Usage Quotas') if Feature.enabled?(:project_storage_ui, default_enabled: :yaml))
s_('UsageQuota|Usage Quotas')
]
}
].compact
......
......@@ -987,30 +987,12 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
end
describe 'Usage Quotas' do
context 'with project_storage_ui feature flag enabled' do
before do
stub_feature_flags(project_storage_ui: true)
end
it 'has a link to Usage Quotas' do
render
expect(rendered).to have_link('Usage Quotas', href: project_usage_quotas_path(project))
end
end
context 'with project_storage_ui feature flag disabled' do
before do
stub_feature_flags(project_storage_ui: false)
end
it 'does not have a link to Usage Quotas' do
render
expect(rendered).not_to have_link('Usage Quotas', href: project_usage_quotas_path(project))
end
end
end
end
describe 'Hidden menus' 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