Commit 403650eb authored by Mike Kozono's avatar Mike Kozono

Enable Package File replication by default

We are keeping the feature flag around for at least one release, out of
caution, since it enables so much new code. Anyway, the locations of the
conditionals may be reused to add a feature allowing admins to disable
replication per replicable model per secondary:
https://gitlab.com/gitlab-org/gitlab/-/issues/222715

I renamed the feature flag because there are other usages of it for the
frontend development work, which needs to remain disabled by default for
now.
parent f2a49133
......@@ -14,7 +14,7 @@ module Geo
def handle_after_create_commit
publish(:created, **created_params)
return unless Feature.enabled?(:geo_self_service_framework)
return unless Feature.enabled?(:geo_self_service_framework_replication, default_enabled: true)
schedule_checksum_calculation if needs_checksum?
end
......
---
title: 'Geo: Enable Package File replication'
merge_request: 34702
author:
type: added
......@@ -174,7 +174,7 @@ module Gitlab
# @param [Symbol] event_name
# @param [Hash] event_data
def publish(event_name, **event_data)
return unless Feature.enabled?(:geo_self_service_framework)
return unless Feature.enabled?(:geo_self_service_framework_replication, default_enabled: true)
raise ArgumentError, "Unsupported event: '#{event_name}'" unless self.class.event_supported?(event_name)
......
......@@ -94,9 +94,9 @@ RSpec.describe Gitlab::Geo::Replicator do
describe '#publish' do
subject { Geo::DummyReplicator.new }
context 'when geo_self_service_framework feature is disabled' do
context 'when geo_self_service_framework_replication feature is disabled' do
before do
stub_feature_flags(geo_self_service_framework: false)
stub_feature_flags(geo_self_service_framework_replication: false)
end
it 'returns nil' do
......
......@@ -38,7 +38,7 @@ RSpec.shared_examples 'a blob replicator' do
end
it 'does not schedule the checksum calculation if feature flag is disabled' do
stub_feature_flags(geo_self_service_framework: false)
stub_feature_flags(geo_self_service_framework_replication: false)
expect(Geo::BlobVerificationPrimaryWorker).not_to receive(:perform_async)
allow(replicator).to receive(:needs_checksum?).and_return(true)
......
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