Skip to content
Snippets Groups Projects
Commit fcb3386b authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

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
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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).
 
Loading
Loading
Loading
Loading
@@ -45,8 +45,7 @@ class GeoNodeType < BaseObject
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,
Loading
Loading
Loading
Loading
@@ -208,7 +208,7 @@ def replicable_types
}
]
 
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'),
Loading
Loading
Loading
Loading
@@ -39,7 +39,7 @@ def object_storage_scope(node)
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
Loading
Loading
@@ -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
Loading
Loading
@@ -21,7 +21,7 @@ def self.registry_consistency_worker_enabled?
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)
Loading
Loading
@@ -29,7 +29,7 @@ def self.failed
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)
Loading
Loading
@@ -37,7 +37,7 @@ def self.never_attempted_sync
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)
Loading
Loading
@@ -45,7 +45,7 @@ def self.retry_due
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)
Loading
Loading
Loading
Loading
@@ -492,7 +492,7 @@ def load_repositories_data
 
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
Loading
Loading
Loading
Loading
@@ -11,9 +11,5 @@ def carrierwave_uploader
def self.model
::LfsObject
end
def self.replication_enabled_by_default?
false
end
end
end
Loading
Loading
@@ -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
Loading
Loading
@@ -36,7 +36,7 @@ class GeoNodeStatus < Grape::Entity
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
Loading
Loading
Loading
Loading
@@ -256,7 +256,7 @@ def print_verified_wikis
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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment