Commit 771e7fc6 authored by Alex Ives's avatar Alex Ives

Release the merge request diff replication

- Add changelog releasing the merge request diff replication
- Updated documentation about replicated types
- Default geo_merge_request_diff_replication to true

Relates to https://gitlab.com/gitlab-org/gitlab/issues/247100
parent 58827738
...@@ -7224,8 +7224,7 @@ type GeoNode { ...@@ -7224,8 +7224,7 @@ type GeoNode {
internalUrl: String internalUrl: String
""" """
Find merge request diff registries on this Geo node. Available only when Find merge request diff registries on this Geo node
feature flag `geo_merge_request_diff_replication` is enabled
""" """
mergeRequestDiffRegistries( mergeRequestDiffRegistries(
""" """
......
...@@ -19906,7 +19906,7 @@ ...@@ -19906,7 +19906,7 @@
}, },
{ {
"name": "mergeRequestDiffRegistries", "name": "mergeRequestDiffRegistries",
"description": "Find merge request diff registries on this Geo node. Available only when feature flag `geo_merge_request_diff_replication` is enabled", "description": "Find merge request diff registries on this Geo node",
"args": [ "args": [
{ {
"name": "ids", "name": "ids",
...@@ -25,8 +25,7 @@ module Types ...@@ -25,8 +25,7 @@ module Types
field :merge_request_diff_registries, ::Types::Geo::MergeRequestDiffRegistryType.connection_type, field :merge_request_diff_registries, ::Types::Geo::MergeRequestDiffRegistryType.connection_type,
null: true, null: true,
resolver: ::Resolvers::Geo::MergeRequestDiffRegistriesResolver, resolver: ::Resolvers::Geo::MergeRequestDiffRegistriesResolver,
description: 'Find merge request diff registries on this Geo node', description: 'Find merge request diff registries on this Geo node'
feature_flag: :geo_merge_request_diff_replication
field :package_file_registries, ::Types::Geo::PackageFileRegistryType.connection_type, field :package_file_registries, ::Types::Geo::PackageFileRegistryType.connection_type,
null: true, null: true,
resolver: ::Resolvers::Geo::PackageFileRegistriesResolver, resolver: ::Resolvers::Geo::PackageFileRegistriesResolver,
......
...@@ -8,10 +8,6 @@ module Geo ...@@ -8,10 +8,6 @@ module Geo
::MergeRequestDiff ::MergeRequestDiff
end end
def self.replication_enabled_by_default?
false
end
def self.primary_total_count def self.primary_total_count
model.has_external_diffs.count model.has_external_diffs.count
end end
......
---
title: Enable geo replication for merge request diffs
merge_request: 45224
author:
type: added
...@@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34248 ...@@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34248
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/247100 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/247100
group: group::geo group: group::geo
type: development type: development
default_enabled: false default_enabled: true
\ No newline at end of file
...@@ -111,23 +111,6 @@ RSpec.describe Geo::Secondary::RegistryConsistencyWorker, :geo do ...@@ -111,23 +111,6 @@ RSpec.describe Geo::Secondary::RegistryConsistencyWorker, :geo do
expect(Geo::UploadRegistry.where(file_id: upload.id).count).to eq(1) expect(Geo::UploadRegistry.where(file_id: upload.id).count).to eq(1)
end end
context 'when geo_merge_request_diff_replication is disabled' do
before do
stub_feature_flags(geo_merge_request_diff_replication: false)
end
it 'returns false' do
expect(subject.perform).to be_falsey
end
it 'does not execute RegistryConsistencyService for merge request diffs' do
allow(Geo::RegistryConsistencyService).to receive(:new).and_call_original
expect(Geo::RegistryConsistencyService).not_to receive(:new).with(Geo::MergeRequestDiffRegistry, batch_size: batch_size)
subject.perform
end
end
context 'when the current Geo node is disabled or primary' do context 'when the current Geo node is disabled or primary' do
before do before do
stub_primary_node stub_primary_node
......
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