Commit fcb3386b authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'enable-lfs-over-ssf-by-default' into 'master'

Enable LFS object replication feature flag by default

See merge request gitlab-org/gitlab!61406
parents 421d10b7 e3689cc4
......@@ -8608,7 +8608,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
##### `GeoNode.lfsObjectRegistries`
Find LFS object registries on this Geo node. Available only when feature flag `geo_lfs_object_replication` is enabled.
Find LFS object registries on this Geo node.
Returns [`LfsObjectRegistryConnection`](#lfsobjectregistryconnection).
......
......@@ -45,8 +45,7 @@ module Types
field :lfs_object_registries, ::Types::Geo::LfsObjectRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::LfsObjectRegistriesResolver,
description: 'Find LFS object registries on this Geo node.',
feature_flag: :geo_lfs_object_replication
description: 'Find LFS object registries on this Geo node.'
field :pipeline_artifact_registries, ::Types::Geo::PipelineArtifactRegistryType.connection_type,
null: true,
resolver: ::Resolvers::Geo::PipelineArtifactRegistriesResolver,
......
......@@ -208,7 +208,7 @@ module EE
}
]
if ::Feature.disabled?(:geo_lfs_object_replication)
if ::Feature.disabled?(:geo_lfs_object_replication, default_enabled: :yaml)
replicable_types.insert(2, {
data_type: 'blob',
data_type_title: _('File'),
......
......@@ -39,7 +39,7 @@ module EE
end
def log_geo_deleted_event
::Geo::LfsObjectDeletedEventStore.new(self).create! if ::Feature.disabled?(:geo_lfs_object_replication)
::Geo::LfsObjectDeletedEventStore.new(self).create! if ::Feature.disabled?(:geo_lfs_object_replication, default_enabled: :yaml)
end
end
end
......@@ -13,7 +13,7 @@ class Geo::LfsObjectRegistry < Geo::BaseRegistry
belongs_to :lfs_object, class_name: 'LfsObject'
def self.registry_consistency_worker_enabled?
if ::Feature.enabled?(:geo_lfs_object_replication)
if ::Feature.enabled?(:geo_lfs_object_replication, default_enabled: :yaml)
replicator_class.enabled?
else
true
......@@ -21,7 +21,7 @@ class Geo::LfsObjectRegistry < Geo::BaseRegistry
end
def self.failed
if Feature.enabled?(:geo_lfs_object_replication)
if Feature.enabled?(:geo_lfs_object_replication, default_enabled: :yaml)
with_state(:failed)
else
where(success: false).where.not(retry_count: nil)
......@@ -29,7 +29,7 @@ class Geo::LfsObjectRegistry < Geo::BaseRegistry
end
def self.never_attempted_sync
if Feature.enabled?(:geo_lfs_object_replication)
if Feature.enabled?(:geo_lfs_object_replication, default_enabled: :yaml)
pending.where(last_synced_at: nil)
else
where(success: false, retry_count: nil)
......@@ -37,7 +37,7 @@ class Geo::LfsObjectRegistry < Geo::BaseRegistry
end
def self.retry_due
if Feature.enabled?(:geo_lfs_object_replication)
if Feature.enabled?(:geo_lfs_object_replication, default_enabled: :yaml)
where(arel_table[:retry_at].eq(nil).or(arel_table[:retry_at].lt(Time.current)))
else
where('retry_at is NULL OR retry_at < ?', Time.current)
......@@ -45,7 +45,7 @@ class Geo::LfsObjectRegistry < Geo::BaseRegistry
end
def self.synced
if Feature.enabled?(:geo_lfs_object_replication)
if Feature.enabled?(:geo_lfs_object_replication, default_enabled: :yaml)
with_state(:synced).or(where(success: true))
else
where(success: true)
......
......@@ -492,7 +492,7 @@ class GeoNodeStatus < ApplicationRecord
def load_lfs_objects_data
return unless lfs_objects_replication_enabled
return if Feature.enabled?(:geo_lfs_object_replication)
return if Feature.enabled?(:geo_lfs_object_replication, default_enabled: :yaml)
self.lfs_objects_count = lfs_objects_finder.registry_count
self.lfs_objects_synced_count = lfs_objects_finder.synced_count
......
......@@ -11,9 +11,5 @@ module Geo
def self.model
::LfsObject
end
def self.replication_enabled_by_default?
false
end
end
end
......@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/329697
milestone: '13.11'
type: development
group: group::geo
default_enabled: false
default_enabled: true
......@@ -36,7 +36,7 @@ module EE
expose :db_replication_lag_seconds
expose :attachments_replication_enabled
expose :lfs_objects_replication_enabled, if: -> (*) { ::Feature.enabled?(:geo_lfs_object_replication) }
expose :lfs_objects_replication_enabled, if: -> (*) { ::Feature.enabled?(:geo_lfs_object_replication, default_enabled: :yaml) }
expose :job_artifacts_replication_enabled
expose :container_repositories_replication_enabled
expose :design_repositories_replication_enabled
......
......@@ -256,7 +256,7 @@ module Gitlab
end
def print_lfs_objects_status
return if Feature.enabled?(:geo_lfs_object_replication)
return if Feature.enabled?(:geo_lfs_object_replication, default_enabled: :yaml)
print 'LFS Objects: '.rjust(GEO_STATUS_COLUMN_WIDTH)
show_failed_value(current_node_status.lfs_objects_failed_count)
......
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