From 23f1d1b9449034759586b3b2708d60c793a6296f Mon Sep 17 00:00:00 2001 From: GitLab Housekeeping Bot Date: Mon, 1 Sep 2025 09:55:20 +0000 Subject: [PATCH] Delete the `geo_object_storage_verification` feature flag This feature flag was introduced in 16.4, which is more than 4 milestones ago. As part of our process we want to ensure [feature flags don't stay too long in the codebase](https://docs.gitlab.com/ee/development/feature_flags/#types-of-feature-flags). Rollout issue: https://gitlab.com/gitlab-org/gitlab/-/issues/410387
Remaining mentions of the feature flag (click to expand) ``` doc/administration/geo/replication/datatypes.md 84:1. Object Storage verification is behind a [feature flag](../../feature_flags/_index.md), `geo_object_storage_verification`, [introduced in 16.4](https://gitlab.com/groups/gitlab-org/-/epics/8056) and enabled by default. It uses a checksum of the file size to verify the files. doc/administration/geo/replication/object_storage.md 18:- Verification of files stored in object storage was [introduced](https://gitlab.com/groups/gitlab-org/-/epics/8056) in GitLab 16.4 [with a flag](../../feature_flags/_index.md) named `geo_object_storage_verification`. Enabled by default. doc-locale/ja-jp/update/versions/gitlab_16_changes.md 561: sudo gitlab-rails runner 'Feature.disable(:geo_object_storage_verification)' 740: sudo gitlab-rails runner 'Feature.disable(:geo_object_storage_verification)' doc/administration/geo/replication/datatypes.md 84:1. Object Storage verification is behind a [feature flag](../../feature_flags/_index.md), `geo_object_storage_verification`, [introduced in 16.4](https://gitlab.com/groups/gitlab-org/-/epics/8056) and enabled by default. It uses a checksum of the file size to verify the files. 253:> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/410387) in GitLab 18.5. Feature flag `geo_object_storage_verification` removed. doc/administration/geo/replication/object_storage.md 18:- Verification of files stored in object storage was [introduced](https://gitlab.com/groups/gitlab-org/-/epics/8056) in GitLab 16.4 [with a flag](../../feature_flags/_index.md) named `geo_object_storage_verification`. Enabled by default. 19:- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/410387) in GitLab 18.5. Feature flag `geo_object_storage_verification` removed. doc/update/versions/gitlab_16_changes.md 628: > - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/410387) in GitLab 18.5. Feature flag `geo_object_storage_verification` removed. 810: > - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/410387) in GitLab 18.5. Feature flag `geo_object_storage_verification` removed. ```
**Currently the feature flag is `enabled` on production** It is possible that this MR will still need some changes to remove references to the feature flag in the code. At the moment the `gitlab-housekeeper` is not always capable of removing all references so you must check the diff and pipeline failures to confirm if there are any issues. It is the responsibility of ~"group::geo" to push those changes to this branch. **Note:** If you do not want to remove this feature flag at this time, you can add an `intended_to_rollout_by_date` attribute in the feature flag YAML file to prevent automated removal. ## TODO for the reviewers before merging this MR - [ ] See the status of the rollout by checking https://gitlab.com/gitlab-org/gitlab/-/issues/410387, https://gitlab.com/gitlab-com/gl-infra/feature-flag-log/-/issues/?search=geo_object_storage_verification&sort=created_date&state=all&label_name%5B%5D=host%3A%3Agitlab.com - [ ] Verify the feature flag status via chatops by running `/chatops run feature get geo_object_storage_verification`. - [ ] [Search for references to `GeoObjectStorageVerification` in frontend part of code](https://gitlab.com/search?project_id=278964&scope=blobs&search=GeoObjectStorageVerification®ex=false) - [ ] [Search for references to `geo_object_storage_verification` in code](https://gitlab.com/search?project_id=278964&scope=blobs&search=geo_object_storage_verification®ex=false) - [ ] Check if we need to remove any Gem or other related code by looking at the changes in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127408 This change was generated by [gitlab-housekeeper](https://gitlab.com/gitlab-org/gitlab/-/tree/master/gems/gitlab-housekeeper) in [CI](https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/jobs/11202603532) using the `Keeps::DeleteOldFeatureFlags` keep. To provide feedback on your experience with `gitlab-housekeeper` please create an issue with the label ~"GitLab Housekeeper" and consider pinging the author of this keep. Changelog: removed --- .../geo/replication/datatypes.md | 3 +- .../geo/replication/object_storage.md | 1 + doc/update/versions/gitlab_16_changes.md | 14 +----- .../models/concerns/geo/replicable_model.rb | 2 +- .../geo_object_storage_verification.yml | 8 ---- .../gitlab/geo/replication/blob_downloader.rb | 2 +- .../concerns/geo/replicable_model_spec.rb | 43 ++----------------- ...del_with_separate_table_shared_examples.rb | 4 -- 8 files changed, 10 insertions(+), 67 deletions(-) delete mode 100644 ee/config/feature_flags/development/geo_object_storage_verification.yml diff --git a/doc/administration/geo/replication/datatypes.md b/doc/administration/geo/replication/datatypes.md index 37530ee162a25e..9c0cefaa251cb9 100644 --- a/doc/administration/geo/replication/datatypes.md +++ b/doc/administration/geo/replication/datatypes.md @@ -249,4 +249,5 @@ successfully, you must replicate their data using some other means. 1. Migrated to self-service framework in 15.5. See GitLab issue [#337436](https://gitlab.com/gitlab-org/gitlab/-/issues/337436) for more details. 1. Migrated to self-service framework in 15.11. Behind feature flag `geo_project_wiki_repository_replication`, enabled by default. See GitLab issue [#367925](https://gitlab.com/gitlab-org/gitlab/-/issues/367925) for more details. -1. Verification of files stored in object storage was [introduced](https://gitlab.com/groups/gitlab-org/-/epics/8056) in GitLab 16.4 [with a feature flag](../../feature_flags/_index.md) named `geo_object_storage_verification`, enabled by default. +1. Verification of files stored in object storage was [introduced](https://gitlab.com/groups/gitlab-org/-/epics/8056) in GitLab 16.4. +> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/410387) in GitLab 18.5. Feature flag `geo_object_storage_verification` removed. diff --git a/doc/administration/geo/replication/object_storage.md b/doc/administration/geo/replication/object_storage.md index c009524e25568b..e4a84223898c2c 100644 --- a/doc/administration/geo/replication/object_storage.md +++ b/doc/administration/geo/replication/object_storage.md @@ -16,6 +16,7 @@ title: Geo with Object storage {{< history >}} - Verification of files stored in object storage was [introduced](https://gitlab.com/groups/gitlab-org/-/epics/8056) in GitLab 16.4 [with a flag](../../feature_flags/_index.md) named `geo_object_storage_verification`. Enabled by default. +- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/410387) in GitLab 18.5. Feature flag `geo_object_storage_verification` removed. {{< /history >}} diff --git a/doc/update/versions/gitlab_16_changes.md b/doc/update/versions/gitlab_16_changes.md index 0ee8e1da35a6a2..564722033f72c8 100644 --- a/doc/update/versions/gitlab_16_changes.md +++ b/doc/update/versions/gitlab_16_changes.md @@ -625,12 +625,7 @@ Specific information applies to installations using Geo: Your installation may be impacted if you have configured it to use [object storage](../../administration/object_storage.md) and have enabled [GitLab-managed object storage replication](../../administration/geo/replication/object_storage.md#enabling-gitlab-managed-object-storage-replication) - Until this is fixed, the workaround is to disable object storage verification. - Run the following command on one of the Rails nodes on the primary site: - - ```shell - sudo gitlab-rails runner 'Feature.disable(:geo_object_storage_verification)' - ``` + > - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/410387) in GitLab 18.5. Feature flag `geo_object_storage_verification` removed. **Affected releases**: @@ -812,12 +807,7 @@ Specific information applies to installations using Geo: Your installation may be impacted if you have configured it to use [object storage](../../administration/object_storage.md) and have enabled [GitLab-managed object storage replication](../../administration/geo/replication/object_storage.md#enabling-gitlab-managed-object-storage-replication) - Until this is fixed, the workaround is to disable object storage verification. - Run the following command on one of the Rails nodes on the primary site: - - ```shell - sudo gitlab-rails runner 'Feature.disable(:geo_object_storage_verification)' - ``` + > - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/410387) in GitLab 18.5. Feature flag `geo_object_storage_verification` removed. **Affected releases**: diff --git a/ee/app/models/concerns/geo/replicable_model.rb b/ee/app/models/concerns/geo/replicable_model.rb index f79caf0ae50403..c79aa1b5429b64 100644 --- a/ee/app/models/concerns/geo/replicable_model.rb +++ b/ee/app/models/concerns/geo/replicable_model.rb @@ -85,7 +85,7 @@ def replicables_for_current_secondary(primary_key_in) # @return [ActiveRecord::Relation] scope observing object storage settings of the given node def object_storage_scope(node) return all unless object_storable? - return all if node.primary? && Feature.enabled?(:geo_object_storage_verification) + return all if node.primary? return all if node.secondary? && node.sync_object_storage? with_files_stored_locally diff --git a/ee/config/feature_flags/development/geo_object_storage_verification.yml b/ee/config/feature_flags/development/geo_object_storage_verification.yml deleted file mode 100644 index fb958fcde0f39f..00000000000000 --- a/ee/config/feature_flags/development/geo_object_storage_verification.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: geo_object_storage_verification -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127408 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/410387 -milestone: '16.4' -type: development -group: group::geo -default_enabled: true diff --git a/ee/lib/gitlab/geo/replication/blob_downloader.rb b/ee/lib/gitlab/geo/replication/blob_downloader.rb index 9adc36d160729d..a81abac3d0cec3 100644 --- a/ee/lib/gitlab/geo/replication/blob_downloader.rb +++ b/ee/lib/gitlab/geo/replication/blob_downloader.rb @@ -247,7 +247,7 @@ def checksum_mismatch?(file_path) def actual_checksum(file_path) @actual_checksum = if file_storage? Digest::SHA256.file(file_path).hexdigest - elsif Feature.enabled?(:geo_object_storage_verification) + else format_file_size_for_checksum(File.size(file_path).to_s) end end diff --git a/ee/spec/models/concerns/geo/replicable_model_spec.rb b/ee/spec/models/concerns/geo/replicable_model_spec.rb index e753b5e1c852f8..8a8f76b1176de2 100644 --- a/ee/spec/models/concerns/geo/replicable_model_spec.rb +++ b/ee/spec/models/concerns/geo/replicable_model_spec.rb @@ -85,47 +85,10 @@ stub_current_geo_node(primary_node) end - context 'when geo_object_storage_verification feature flag is disabled' do - before do - stub_feature_flags(geo_object_storage_verification: false) - end - - context 'when the model can be filtered by locally stored files' do - it 'filters by locally stored files' do - allow(DummyModel).to receive(:respond_to?).with(:all).and_call_original - allow(DummyModel).to receive(:respond_to?).with(:object_storage_scope).and_call_original - allow(DummyModel).to receive(:respond_to?).with(:selective_sync_scope).and_call_original - allow(DummyModel).to receive(:respond_to?).with(:with_files_stored_locally).and_return(true) - - expect(DummyModel).to receive(:with_files_stored_locally).once.and_return(DummyModel.none) - - DummyModel.verifiables - end - end - - context 'when the model cannot be filtered by locally stored files' do - it 'does not filter by locally stored files' do - allow(DummyModel).to receive(:respond_to?).with(:all).and_call_original - allow(DummyModel).to receive(:respond_to?).with(:object_storage_scope).and_call_original - allow(DummyModel).to receive(:respond_to?).with(:selective_sync_scope).and_call_original - allow(DummyModel).to receive(:respond_to?).with(:with_files_stored_locally).and_return(false) + it 'aliasses to .available_replicables' do + expect(DummyModel).to receive(:available_replicables).once.and_call_original - expect(DummyModel).not_to receive(:with_files_stored_locally) - - DummyModel.verifiables - end - end - end - - # We don't need to test the case when geo_object_storage_verification is enabled - # because the whole .verifiables method won't be needed anymore after the FF is removed. - # This one has only symbolic meaning before the removal - context 'when geo_object_storage_verification feature flag is enabled' do - it 'aliasses to .available_replicables' do - expect(DummyModel).to receive(:available_replicables).once.and_call_original - - DummyModel.verifiables - end + DummyModel.verifiables end end diff --git a/ee/spec/support/shared_examples/models/concerns/verifiable_model_with_separate_table_shared_examples.rb b/ee/spec/support/shared_examples/models/concerns/verifiable_model_with_separate_table_shared_examples.rb index ce438b0f047eca..1aa1362b1ad4dd 100644 --- a/ee/spec/support/shared_examples/models/concerns/verifiable_model_with_separate_table_shared_examples.rb +++ b/ee/spec/support/shared_examples/models/concerns/verifiable_model_with_separate_table_shared_examples.rb @@ -12,10 +12,6 @@ RSpec.shared_examples 'a verifiable model with a separate table for verification state' do include EE::GeoHelpers - before do - stub_feature_flags(geo_object_storage_verification: false) - end - context 'on a primary node' do let(:primary) { create(:geo_node, :primary) } let(:secondary) { create(:geo_node, :secondary) } -- GitLab