Class: Gitlab::BackgroundMigration::ResetStatusOnContainerRepositories::ContainerRepository

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
lib/gitlab/background_migration/reset_status_on_container_repositories.rb

Constant Summary

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Constants included from ResetOnUnionError

ResetOnUnionError::MAX_RESET_PERIOD

Instance Method Summary collapse

Methods inherited from ApplicationRecord

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

Methods included from SensitiveSerializableHash

#serializable_hash

Instance Method Details

#pathObject



108
109
110
# File 'lib/gitlab/background_migration/reset_status_on_container_repositories.rb', line 108

def path
  @path ||= [project.full_path, name].select(&:present?).join('/').downcase
end

#tags?Boolean

Returns:

  • (Boolean)


97
98
99
100
101
102
103
104
105
106
# File 'lib/gitlab/background_migration/reset_status_on_container_repositories.rb', line 97

def tags?
  result = ContainerRegistry.tags_for(path).any?
  ::Gitlab::BackgroundMigration::Logger.info(
    migrator: MIGRATOR,
    has_tags: result,
    container_repository_id: id,
    container_repository_path: path
  )
  result
end