Commit 9b7059a4 authored by Mike Kozono's avatar Mike Kozono

Remove feature flag already default enabled

Name: geo_treat_missing_files_as_sync_failed

Changelog: other
EE: true
parent d58a6c69
......@@ -33,10 +33,6 @@ module Geo
mark_as_synced = download_result.success
if download_result.primary_missing_file && Feature.disabled?(:geo_treat_missing_files_as_sync_failed, default_enabled: :yaml)
mark_as_synced = true
end
if mark_as_synced
registry.synced!
else
......
---
name: geo_treat_missing_files_as_sync_failed
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76801
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/348590
milestone: '14.6'
type: development
group: group::geo
default_enabled: true
......@@ -73,56 +73,28 @@ RSpec.describe Geo::BlobDownloadService do
end
context "when the file is missing on the primary" do
context "when the feature flag geo_treat_missing_files_as_sync_failed is enabled" do
let(:result) { double(:result, success: false, primary_missing_file: true, bytes_downloaded: 123, reason: "foo", extra_details: nil) }
it "creates the registry" do
expect do
subject.execute
end.to change { registry_class.count }.by(1)
end
it "sets sync state to failed" do
subject.execute
expect(registry_class.last).to be_failed
end
it 'caps retry wait time to 4 hours' do
registry = replicator.registry
registry.retry_count = 9999
registry.save!
let(:result) { double(:result, success: false, primary_missing_file: true, bytes_downloaded: 123, reason: "foo", extra_details: nil) }
it "creates the registry" do
expect do
subject.execute
expect(registry.reload.retry_at).to be_within(10.minutes).of(4.hours.from_now)
end
end.to change { registry_class.count }.by(1)
end
context "when the feature flag geo_treat_missing_files_as_sync_failed is disabled" do
let(:result) { double(:result, success: false, primary_missing_file: true, bytes_downloaded: 123, reason: "foo", extra_details: nil) }
before do
stub_feature_flags(geo_treat_missing_files_as_sync_failed: false)
end
it "creates the registry" do
expect do
subject.execute
end.to change { registry_class.count }.by(1)
end
it "sets sync state to failed" do
subject.execute
it "sets sync state to synced" do
subject.execute
expect(registry_class.last).to be_failed
end
expect(registry_class.last).to be_synced
end
it 'caps retry wait time to 4 hours' do
registry = replicator.registry
registry.retry_count = 9999
registry.save!
it 'does not set retry_at because it is not a failure' do
subject.execute
subject.execute
expect(registry_class.last.retry_at).to be_nil
end
expect(registry.reload.retry_at).to be_within(10.minutes).of(4.hours.from_now)
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