Commit 197edba5 authored by Andy Soiron's avatar Andy Soiron

Merge branch 'id-remove-bitmap-creation-option' into 'master'

Remove bitmap creation housekeeping option

See merge request gitlab-org/gitlab!83984
parents 9f4f8a74 249c5b28
...@@ -266,7 +266,6 @@ module ApplicationSettingsHelper ...@@ -266,7 +266,6 @@ module ApplicationSettingsHelper
:help_page_text, :help_page_text,
:hide_third_party_offers, :hide_third_party_offers,
:home_page_url, :home_page_url,
:housekeeping_bitmaps_enabled,
:housekeeping_enabled, :housekeeping_enabled,
:housekeeping_full_repack_period, :housekeeping_full_repack_period,
:housekeeping_gc_period, :housekeeping_gc_period,
......
...@@ -95,7 +95,6 @@ module ApplicationSettingImplementation ...@@ -95,7 +95,6 @@ module ApplicationSettingImplementation
help_page_text: nil, help_page_text: nil,
help_page_documentation_base_url: nil, help_page_documentation_base_url: nil,
hide_third_party_offers: false, hide_third_party_offers: false,
housekeeping_bitmaps_enabled: true,
housekeeping_enabled: true, housekeeping_enabled: true,
housekeeping_full_repack_period: 50, housekeeping_full_repack_period: 50,
housekeeping_gc_period: 200, housekeeping_gc_period: 200,
......
...@@ -28,13 +28,6 @@ ...@@ -28,13 +28,6 @@
.form-text.text-muted .form-text.text-muted
= _("Leaving this setting enabled is recommended.") = _("Leaving this setting enabled is recommended.")
= link_to s_('Learn more.'), help_page_path('administration/housekeeping.md', anchor: 'housekeeping-options'), target: '_blank', rel: 'noopener noreferrer' = link_to s_('Learn more.'), help_page_path('administration/housekeeping.md', anchor: 'housekeeping-options'), target: '_blank', rel: 'noopener noreferrer'
.form-check
= f.check_box :housekeeping_bitmaps_enabled, class: 'form-check-input'
= f.label :housekeeping_bitmaps_enabled, class: 'form-check-label' do
= _("Enable Git pack file bitmap creation")
.form-text.text-muted
= _("Improves Git cloning performance.")
= link_to s_('Learn more.'), help_page_path('administration/housekeeping.md', anchor: 'housekeeping-options'), target: '_blank', rel: 'noopener noreferrer'
.form-group .form-group
= f.label :housekeeping_incremental_repack_period, 'Incremental repack period', class: 'label-bold' = f.label :housekeeping_incremental_repack_period, 'Incremental repack period', class: 'label-bold'
= f.number_field :housekeeping_incremental_repack_period, class: 'form-control gl-form-input' = f.number_field :housekeeping_incremental_repack_period, class: 'form-control gl-form-input'
......
...@@ -121,8 +121,12 @@ module GitGarbageCollectMethods ...@@ -121,8 +121,12 @@ module GitGarbageCollectMethods
end.new(repository) end.new(repository)
end end
# The option to enable/disable bitmaps has been removed in https://gitlab.com/gitlab-org/gitlab/-/issues/353777
# Now the options is always enabled
# This method and all the deprecated RPCs are going to be removed in
# https://gitlab.com/gitlab-org/gitlab/-/issues/353779
def bitmaps_enabled? def bitmaps_enabled?
Gitlab::CurrentSettings.housekeeping_bitmaps_enabled true
end end
def flush_ref_caches(resource) def flush_ref_caches(resource)
......
...@@ -40,8 +40,6 @@ The following housekeeping options are available: ...@@ -40,8 +40,6 @@ The following housekeeping options are available:
- **Enable automatic repository housekeeping**: Regularly run `git repack` and `git gc`. If you - **Enable automatic repository housekeeping**: Regularly run `git repack` and `git gc`. If you
keep this setting disabled for a long time, Git repository access on your GitLab server becomes keep this setting disabled for a long time, Git repository access on your GitLab server becomes
slower and your repositories use more disk space. slower and your repositories use more disk space.
- **Enable Git pack file bitmap creation**: Create pack file bitmaps which accelerates `git clone`
performance. Makes housekeeping take a little longer.
- **Incremental repack period**: Number of Git pushes after which an incremental `git repack` is - **Incremental repack period**: Number of Git pushes after which an incremental `git repack` is
run. run.
- **Full repack period**: Number of Git pushes after which a full `git repack` is run. - **Full repack period**: Number of Git pushes after which a full `git repack` is run.
......
...@@ -342,7 +342,7 @@ listed in the descriptions of the relevant settings. ...@@ -342,7 +342,7 @@ listed in the descriptions of the relevant settings.
| `help_text` **(PREMIUM)** | string | no | GitLab server administrator information. | | `help_text` **(PREMIUM)** | string | no | GitLab server administrator information. |
| `hide_third_party_offers` | boolean | no | Do not display offers from third parties in GitLab. | | `hide_third_party_offers` | boolean | no | Do not display offers from third parties in GitLab. |
| `home_page_url` | string | no | Redirect to this URL when not logged in. | | `home_page_url` | string | no | Redirect to this URL when not logged in. |
| `housekeeping_bitmaps_enabled` | boolean | required by: `housekeeping_enabled` | Enable Git pack file bitmap creation. | | `housekeeping_bitmaps_enabled` | boolean | no | Git pack file bitmap creation is always enabled and cannot be changed via API and UI. This API field is deprecated and always returns `true`. |
| `housekeeping_enabled` | boolean | no | (**If enabled, requires:** `housekeeping_bitmaps_enabled`, `housekeeping_full_repack_period`, `housekeeping_gc_period`, and `housekeeping_incremental_repack_period`) Enable or disable Git housekeeping. | | `housekeeping_enabled` | boolean | no | (**If enabled, requires:** `housekeeping_bitmaps_enabled`, `housekeeping_full_repack_period`, `housekeeping_gc_period`, and `housekeeping_incremental_repack_period`) Enable or disable Git housekeeping. |
| `housekeeping_full_repack_period` | integer | required by: `housekeeping_enabled` | Number of Git pushes after which an incremental `git repack` is run. | | `housekeeping_full_repack_period` | integer | required by: `housekeeping_enabled` | Number of Git pushes after which an incremental `git repack` is run. |
| `housekeeping_gc_period` | integer | required by: `housekeeping_enabled` | Number of Git pushes after which `git gc` is run. | | `housekeeping_gc_period` | integer | required by: `housekeeping_enabled` | Number of Git pushes after which `git gc` is run. |
......
...@@ -40,6 +40,9 @@ module API ...@@ -40,6 +40,9 @@ module API
expose :password_authentication_enabled_for_web, as: :signin_enabled expose :password_authentication_enabled_for_web, as: :signin_enabled
expose :allow_local_requests_from_web_hooks_and_services, as: :allow_local_requests_from_hooks_and_services expose :allow_local_requests_from_web_hooks_and_services, as: :allow_local_requests_from_hooks_and_services
expose :asset_proxy_allowlist, as: :asset_proxy_whitelist expose :asset_proxy_allowlist, as: :asset_proxy_whitelist
# This field is deprecated and always returns true
expose(:housekeeping_bitmaps_enabled) { |_settings, _options| true }
end end
end end
end end
......
...@@ -83,7 +83,6 @@ module API ...@@ -83,7 +83,6 @@ module API
optional :home_page_url, type: String, desc: 'We will redirect non-logged in users to this page' optional :home_page_url, type: String, desc: 'We will redirect non-logged in users to this page'
optional :housekeeping_enabled, type: Boolean, desc: 'Enable automatic repository housekeeping (git repack, git gc)' optional :housekeeping_enabled, type: Boolean, desc: 'Enable automatic repository housekeeping (git repack, git gc)'
given housekeeping_enabled: ->(val) { val } do given housekeeping_enabled: ->(val) { val } do
requires :housekeeping_bitmaps_enabled, type: Boolean, desc: "Creating pack file bitmaps makes housekeeping take a little longer but bitmaps should accelerate 'git clone' performance."
requires :housekeeping_full_repack_period, type: Integer, desc: "Number of Git pushes after which a full 'git repack' is run." requires :housekeeping_full_repack_period, type: Integer, desc: "Number of Git pushes after which a full 'git repack' is run."
requires :housekeeping_gc_period, type: Integer, desc: "Number of Git pushes after which 'git gc' is run." requires :housekeeping_gc_period, type: Integer, desc: "Number of Git pushes after which 'git gc' is run."
requires :housekeeping_incremental_repack_period, type: Integer, desc: "Number of Git pushes after which an incremental 'git repack' is run." requires :housekeeping_incremental_repack_period, type: Integer, desc: "Number of Git pushes after which an incremental 'git repack' is run."
......
...@@ -13798,9 +13798,6 @@ msgstr "" ...@@ -13798,9 +13798,6 @@ msgstr ""
msgid "Enable Auto DevOps" msgid "Enable Auto DevOps"
msgstr "" msgstr ""
msgid "Enable Git pack file bitmap creation"
msgstr ""
msgid "Enable Gitpod" msgid "Enable Gitpod"
msgstr "" msgstr ""
...@@ -19148,9 +19145,6 @@ msgstr "" ...@@ -19148,9 +19145,6 @@ msgstr ""
msgid "Improve customer support with Service Desk" msgid "Improve customer support with Service Desk"
msgstr "" msgstr ""
msgid "Improves Git cloning performance."
msgstr ""
msgid "In case of pull mirroring, your user will be the author of all events in the activity feed that are the result of an update, like new branches being created or new commits being pushed to existing branches." msgid "In case of pull mirroring, your user will be the author of all events in the activity feed that are the result of an update, like new branches being created or new commits being pushed to existing branches."
msgstr "" msgstr ""
......
...@@ -4,5 +4,6 @@ FactoryBot.define do ...@@ -4,5 +4,6 @@ FactoryBot.define do
factory :application_setting do factory :application_setting do
default_projects_limit { 42 } default_projects_limit { 42 }
import_sources { [] } import_sources { [] }
restricted_visibility_levels { [] }
end end
end end
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe API::Entities::ApplicationSetting do
let_it_be(:application_setting, reload: true) { create(:application_setting) }
subject(:output) { described_class.new(application_setting).as_json }
context 'housekeeping_bitmaps_enabled usage is deprecated and always enabled' do
before do
application_setting.housekeeping_bitmaps_enabled = housekeeping_bitmaps_enabled
end
context 'when housekeeping_bitmaps_enabled db column is false' do
let(:housekeeping_bitmaps_enabled) { false }
it 'returns true' do
expect(subject[:housekeeping_bitmaps_enabled]).to eq(true)
end
end
context 'when housekeeping_bitmaps_enabled db column is true' do
let(:housekeeping_bitmaps_enabled) { false }
it 'returns true' do
expect(subject[:housekeeping_bitmaps_enabled]).to eq(true)
end
end
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