diff --git a/doc/administration/geo/replication/datatypes.md b/doc/administration/geo/replication/datatypes.md index 37530ee162a25e28754f9f1a389b28f6a5d45220..9c0cefaa251cb9d5cef8495c5ee3a2845c2131c3 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 c009524e25568b1b6eeaae0bf5d77fab3cf25548..e4a84223898c2c24d647fec38616b389ddfbe3f9 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 0ee8e1da35a6a23e2f6b72f28bbd68cd0b326637..564722033f72c8967719318e5d4d7e05e4d2ecb3 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 f79caf0ae50403a3af5e99a4006b75e84fabdb9c..c79aa1b5429b643a6dbc3d8c244dd5e4d432f0d8 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 fb958fcde0f39fd8efe14ea48b22678dfbba77aa..0000000000000000000000000000000000000000 --- 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 9adc36d160729d2006f60a1b1e26aefcbbfcf541..a81abac3d0cec3bb1e18a57f5797443af14c1550 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 e753b5e1c852f8226376ef32d46946df027ec137..8a8f76b1176de2bd2ff84c3b9eafbd83b8ead740 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 ce438b0f047eca7f942fa6f3256b4053559140ec..1aa1362b1ad4dde76e214947e1042b03f580e9f3 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) }