Commit 33477c26 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch 'nicolasdular/remove-namespace-storage-limit-setting' into 'master'

Remove namespace storage limit setting

See merge request gitlab-org/gitlab!38108
parents 20aa7303 cedd5fb7
...@@ -225,7 +225,6 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController ...@@ -225,7 +225,6 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:lets_encrypt_terms_of_service_accepted, :lets_encrypt_terms_of_service_accepted,
:domain_blacklist_file, :domain_blacklist_file,
:raw_blob_request_limit, :raw_blob_request_limit,
:namespace_storage_size_limit,
:issues_create_limit, :issues_create_limit,
:default_branch_name, :default_branch_name,
disabled_oauth_sign_in_sources: [], disabled_oauth_sign_in_sources: [],
......
...@@ -5,6 +5,9 @@ class ApplicationSetting < ApplicationRecord ...@@ -5,6 +5,9 @@ class ApplicationSetting < ApplicationRecord
include CacheMarkdownField include CacheMarkdownField
include TokenAuthenticatable include TokenAuthenticatable
include ChronicDurationAttribute include ChronicDurationAttribute
include IgnorableColumns
ignore_column :namespace_storage_size_limit, remove_with: '13.5', remove_after: '2020-09-22'
GRAFANA_URL_ERROR_MESSAGE = 'Please check your Grafana URL setting in ' \ GRAFANA_URL_ERROR_MESSAGE = 'Please check your Grafana URL setting in ' \
'Admin Area > Settings > Metrics and profiling > Metrics - Grafana' 'Admin Area > Settings > Metrics and profiling > Metrics - Grafana'
...@@ -363,10 +366,6 @@ class ApplicationSetting < ApplicationRecord ...@@ -363,10 +366,6 @@ class ApplicationSetting < ApplicationRecord
length: { maximum: 255 }, length: { maximum: 255 },
allow_blank: true allow_blank: true
validates :namespace_storage_size_limit,
presence: true,
numericality: { only_integer: true, greater_than_or_equal_to: 0 }
validates :issues_create_limit, validates :issues_create_limit,
numericality: { only_integer: true, greater_than_or_equal_to: 0 } numericality: { only_integer: true, greater_than_or_equal_to: 0 }
......
...@@ -96,7 +96,6 @@ module ApplicationSettingImplementation ...@@ -96,7 +96,6 @@ module ApplicationSettingImplementation
max_import_size: 50, max_import_size: 50,
minimum_password_length: DEFAULT_MINIMUM_PASSWORD_LENGTH, minimum_password_length: DEFAULT_MINIMUM_PASSWORD_LENGTH,
mirror_available: true, mirror_available: true,
namespace_storage_size_limit: 0,
notify_on_unknown_sign_in: true, notify_on_unknown_sign_in: true,
outbound_local_requests_whitelist: [], outbound_local_requests_whitelist: [],
password_authentication_enabled_for_git: true, password_authentication_enabled_for_git: true,
......
...@@ -8,14 +8,6 @@ ...@@ -8,14 +8,6 @@
= f.label :gravatar_enabled, class: 'form-check-label' do = f.label :gravatar_enabled, class: 'form-check-label' do
= _('Gravatar enabled') = _('Gravatar enabled')
.form-group
= f.label :namespace_storage_size_limit, class: 'label-bold' do
= _('Maximum namespace storage (MB)')
= f.number_field :namespace_storage_size_limit, class: 'form-control', min: 0
%span.form-text.text-muted
= _('Includes repository storage, wiki storage, LFS objects, build artifacts and packages. 0 for unlimited.')
= link_to _('More information'), help_page_path('user/admin_area/settings/account_and_limit_settings', anchor: 'maximum-namespace-storage-size'), target: '_blank'
.form-group .form-group
= f.label :default_projects_limit, _('Default projects limit'), class: 'label-bold' = f.label :default_projects_limit, _('Default projects limit'), class: 'label-bold'
= f.number_field :default_projects_limit, class: 'form-control', title: _('Maximum number of projects.'), data: { toggle: 'tooltip', container: 'body' } = f.number_field :default_projects_limit, class: 'form-control', title: _('Maximum number of projects.'), data: { toggle: 'tooltip', container: 'body' }
......
---
title: Remove namespace storage limit setting
merge_request: 38108
author:
type: removed
...@@ -29,20 +29,6 @@ If you choose a size larger than what is currently configured for the web server ...@@ -29,20 +29,6 @@ If you choose a size larger than what is currently configured for the web server
you will likely get errors. See the [troubleshooting section](#troubleshooting) for more you will likely get errors. See the [troubleshooting section](#troubleshooting) for more
details. details.
## Maximum namespace storage size
This sets a maximum size limit on each namespace. The following are included in the namespace size:
- Repository
- Wiki
- LFS objects
- Build artifacts
- Packages
- Snippets
NOTE: **Note:**
This limit is not currently enforced but will be in a future release.
## Repository size limit **(STARTER ONLY)** ## Repository size limit **(STARTER ONLY)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/740) in [GitLab Enterprise Edition 8.12](https://about.gitlab.com/releases/2016/09/22/gitlab-8-12-released/#limit-project-size-ee). > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/740) in [GitLab Enterprise Edition 8.12](https://about.gitlab.com/releases/2016/09/22/gitlab-8-12-released/#limit-project-size-ee).
......
...@@ -14,8 +14,6 @@ RSpec.describe Namespace::RootStorageSize, type: :model do ...@@ -14,8 +14,6 @@ RSpec.describe Namespace::RootStorageSize, type: :model do
before do before do
create_statistics create_statistics
stub_application_setting(namespace_storage_size_limit: limit)
end end
describe '#above_size_limit?' do describe '#above_size_limit?' do
......
...@@ -12830,9 +12830,6 @@ msgstr "" ...@@ -12830,9 +12830,6 @@ msgstr ""
msgid "Includes an MVC structure, mvnw and pom.xml to help you get started." msgid "Includes an MVC structure, mvnw and pom.xml to help you get started."
msgstr "" msgstr ""
msgid "Includes repository storage, wiki storage, LFS objects, build artifacts and packages. 0 for unlimited."
msgstr ""
msgid "Incoming email" msgid "Incoming email"
msgstr "" msgstr ""
...@@ -14648,9 +14645,6 @@ msgstr "" ...@@ -14648,9 +14645,6 @@ msgstr ""
msgid "Maximum lifetime allowable for Personal Access Tokens is active, your expire date must be set before %{maximum_allowable_date}." msgid "Maximum lifetime allowable for Personal Access Tokens is active, your expire date must be set before %{maximum_allowable_date}."
msgstr "" msgstr ""
msgid "Maximum namespace storage (MB)"
msgstr ""
msgid "Maximum number of %{name} (%{count}) exceeded" msgid "Maximum number of %{name} (%{count}) exceeded"
msgstr "" msgstr ""
......
...@@ -105,22 +105,6 @@ RSpec.describe Admin::ApplicationSettingsController do ...@@ -105,22 +105,6 @@ RSpec.describe Admin::ApplicationSettingsController do
expect(ApplicationSetting.current.minimum_password_length).to eq(10) expect(ApplicationSetting.current.minimum_password_length).to eq(10)
end end
it 'updates namespace_storage_size_limit setting' do
put :update, params: { application_setting: { namespace_storage_size_limit: '100' } }
expect(response).to redirect_to(general_admin_application_settings_path)
expect(response).to set_flash[:notice].to('Application settings saved successfully')
expect(ApplicationSetting.current.namespace_storage_size_limit).to eq(100)
end
it 'does not accept an invalid namespace_storage_size_limit' do
put :update, params: { application_setting: { namespace_storage_size_limit: '-100' } }
expect(response).to render_template(:general)
expect(assigns(:application_setting).errors[:namespace_storage_size_limit]).to be_present
expect(ApplicationSetting.current.namespace_storage_size_limit).not_to eq(-100)
end
it 'updates repository_storages_weighted setting' do it 'updates repository_storages_weighted setting' do
put :update, params: { application_setting: { repository_storages_weighted_default: 75 } } put :update, params: { application_setting: { repository_storages_weighted_default: 75 } }
......
...@@ -87,11 +87,6 @@ RSpec.describe ApplicationSetting do ...@@ -87,11 +87,6 @@ RSpec.describe ApplicationSetting do
it { is_expected.not_to allow_value('abc').for(:minimum_password_length) } it { is_expected.not_to allow_value('abc').for(:minimum_password_length) }
it { is_expected.to allow_value(10).for(:minimum_password_length) } it { is_expected.to allow_value(10).for(:minimum_password_length) }
it { is_expected.to allow_value(0).for(:namespace_storage_size_limit) }
it { is_expected.to allow_value(1).for(:namespace_storage_size_limit) }
it { is_expected.not_to allow_value(nil).for(:namespace_storage_size_limit) }
it { is_expected.not_to allow_value(-1).for(:namespace_storage_size_limit) }
it { is_expected.to allow_value(300).for(:issues_create_limit) } it { is_expected.to allow_value(300).for(:issues_create_limit) }
it { is_expected.not_to allow_value('three').for(:issues_create_limit) } it { is_expected.not_to allow_value('three').for(:issues_create_limit) }
it { is_expected.not_to allow_value(nil).for(:issues_create_limit) } it { is_expected.not_to allow_value(nil).for(:issues_create_limit) }
......
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