Class: BulkImport
Overview
The BulkImport model links all models required for a bulk import of groups and projects to a GitLab instance. It associates the import with the responsible user.
Constant Summary
collapse
- MIN_MAJOR_VERSION =
14
- MIN_MINOR_VERSION_FOR_PROJECT =
4
ApplicationRecord::MAX_PLUCK
ResetOnUnionError::MAX_RESET_PERIOD
Class Method Summary
collapse
Instance Method Summary
collapse
cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
#serializable_hash
Class Method Details
.all_human_statuses ⇒ Object
65
66
67
|
# File 'app/models/bulk_import.rb', line 65
def self.all_human_statuses
state_machine.states.map(&:human_name)
end
|
.min_gl_version_for_migration_in_batches ⇒ Object
61
62
63
|
# File 'app/models/bulk_import.rb', line 61
def self.min_gl_version_for_migration_in_batches
Gitlab::VersionInfo.new(16, 2)
end
|
.min_gl_version_for_project_migration ⇒ Object
Instance Method Details
#source_version_info ⇒ Object
53
54
55
|
# File 'app/models/bulk_import.rb', line 53
def source_version_info
Gitlab::VersionInfo.parse(source_version)
end
|
#supports_batched_export? ⇒ Boolean
76
77
78
|
# File 'app/models/bulk_import.rb', line 76
def supports_batched_export?
source_version_info >= self.class.min_gl_version_for_migration_in_batches
end
|
#update_has_failures ⇒ Object
69
70
71
72
73
74
|
# File 'app/models/bulk_import.rb', line 69
def update_has_failures
return if has_failures
return unless entities.any?(&:has_failures)
update!(has_failures: true)
end
|