Commit 9123e765 authored by Mike Kozono's avatar Mike Kozono

Remove geo_framework_verification feature flag

So we don't need to keep disabling it everywhere in tests. In the next
commit, I am adding functionality which only works with replicators
which have verification enabled, so without this commit, I would have to
disable this feature flag in even more tests. Since this feature flag
doesn't guard anything which even remotely works, let's just remove it.

Since we are replacing its check with false, this commit does *not*
release anything.
parent 4dfe2b4d
...@@ -19,17 +19,9 @@ module Geo ...@@ -19,17 +19,9 @@ module Geo
enabled? && verification_feature_flag_enabled? enabled? && verification_feature_flag_enabled?
end end
# Overridden by PackageFileReplicator with its own feature flag so we can # Override this to check a feature flag
# release verification for PackageFileReplicator alone, at first.
# This feature flag name is not dynamic like the replication feature flag,
# because Geo is proliferating too many permanent feature flags, and if
# there is a serious bug with verification that needs to be shut off
# immediately, then the replication feature flag can be disabled until it
# is fixed. This feature flag is intended to be removed after it is
# defaulted on.
# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46998 for more
def verification_feature_flag_enabled? def verification_feature_flag_enabled?
Feature.enabled?(:geo_framework_verification) false
end end
# Called every minute by VerificationCronWorker # Called every minute by VerificationCronWorker
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
module Geo module Geo
class PackageFileReplicator < Gitlab::Geo::Replicator class PackageFileReplicator < Gitlab::Geo::Replicator
include ::Geo::BlobReplicatorStrategy include ::Geo::BlobReplicatorStrategy
extend ::Gitlab::Utils::Override
def self.model def self.model
::Packages::PackageFile ::Packages::PackageFile
end end
# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46998 for override :verification_feature_flag_enabled?
# reasoning about this override.
def self.verification_feature_flag_enabled? def self.verification_feature_flag_enabled?
Feature.enabled?(:geo_package_file_verification) Feature.enabled?(:geo_package_file_verification)
end end
......
---
name: geo_framework_verification
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46998
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/277400
milestone: '13.6'
type: development
group: group::geo
default_enabled: false
...@@ -407,7 +407,6 @@ RSpec.describe Gitlab::Geo, :geo, :request_store do ...@@ -407,7 +407,6 @@ RSpec.describe Gitlab::Geo, :geo, :request_store do
context 'when there are no Replicator classes with verification enabled' do context 'when there are no Replicator classes with verification enabled' do
it 'returns the total capacity' do it 'returns the total capacity' do
stub_feature_flags(geo_package_file_verification: false) stub_feature_flags(geo_package_file_verification: false)
stub_feature_flags(geo_framework_verification: false)
expect(described_class.verification_max_capacity_per_replicator_class).to eq(verification_max_capacity) expect(described_class.verification_max_capacity_per_replicator_class).to eq(verification_max_capacity)
end end
...@@ -415,8 +414,6 @@ RSpec.describe Gitlab::Geo, :geo, :request_store do ...@@ -415,8 +414,6 @@ RSpec.describe Gitlab::Geo, :geo, :request_store do
context 'when there is 1 Replicator class with verification enabled' do context 'when there is 1 Replicator class with verification enabled' do
it 'returns half capacity' do it 'returns half capacity' do
stub_feature_flags(geo_framework_verification: false)
expect(described_class.verification_max_capacity_per_replicator_class).to eq(verification_max_capacity / 2) expect(described_class.verification_max_capacity_per_replicator_class).to eq(verification_max_capacity / 2)
end end
end end
......
...@@ -18,7 +18,7 @@ RSpec.shared_examples 'a verifiable replicator' do ...@@ -18,7 +18,7 @@ RSpec.shared_examples 'a verifiable replicator' do
expect(described_class).to receive(:enabled?).and_return(true) expect(described_class).to receive(:enabled?).and_return(true)
end end
context 'when the verification feature flag is enabled' do context 'when verification_feature_flag_enabled? returns true' do
it 'returns true' do it 'returns true' do
allow(described_class).to receive(:verification_feature_flag_enabled?).and_return(true) allow(described_class).to receive(:verification_feature_flag_enabled?).and_return(true)
...@@ -26,7 +26,7 @@ RSpec.shared_examples 'a verifiable replicator' do ...@@ -26,7 +26,7 @@ RSpec.shared_examples 'a verifiable replicator' do
end end
end end
context 'when geo_framework_verification feature flag is disabled' do context 'when verification_feature_flag_enabled? returns false' do
it 'returns false' do it 'returns false' do
allow(described_class).to receive(:verification_feature_flag_enabled?).and_return(false) allow(described_class).to receive(:verification_feature_flag_enabled?).and_return(false)
......
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