Add a handler for broken tags in the tag backfill system
This will generate a tag pointing to an empty manifest; the tag will be broken, but as it is *already* broken, at least the backfill can complete
This commit is contained in:
parent
bbaee0d3f2
commit
0bfbccdd44
4 changed files with 49 additions and 10 deletions
|
@ -478,6 +478,9 @@ class PreOCIModel(SharedModel, RegistryDataInterface):
|
|||
|
||||
# Write the manifest to the DB.
|
||||
manifest = self._build_manifest_for_legacy_image(tag_obj.name, tag_obj.image)
|
||||
if manifest is None:
|
||||
return None
|
||||
|
||||
blob_query = model.storage.lookup_repo_storages_by_content_checksum(repo,
|
||||
manifest.checksums)
|
||||
|
||||
|
|
|
@ -418,7 +418,11 @@ class SharedModel:
|
|||
repo_name = repo.name
|
||||
|
||||
# Find the v1 metadata for this image and its parents.
|
||||
parents = model.image.get_parent_images(namespace_name, repo_name, legacy_image_row)
|
||||
try:
|
||||
parents = model.image.get_parent_images(namespace_name, repo_name, legacy_image_row)
|
||||
except model.DataModelException:
|
||||
logger.exception('Could not load parent images for legacy image %s', legacy_image_row.id)
|
||||
return None
|
||||
|
||||
# If the manifest is being generated under the library namespace, then we make its namespace
|
||||
# empty.
|
||||
|
|
Reference in a new issue