Add a check for missing tag manifests
This can occur if a manifest was moved to a different tag
This commit is contained in:
parent
61d00d0c9e
commit
987ffe5614
1 changed files with 9 additions and 6 deletions
|
@ -45,6 +45,7 @@ def verify_backfill(namespace_name):
|
||||||
else:
|
else:
|
||||||
assert tag.lifetime_end_ms is None
|
assert tag.lifetime_end_ms is None
|
||||||
|
|
||||||
|
try:
|
||||||
tag_manifest = tag.manifest
|
tag_manifest = tag.manifest
|
||||||
repo_tag_manifest = TagManifest.get(tag=repo_tag)
|
repo_tag_manifest = TagManifest.get(tag=repo_tag)
|
||||||
|
|
||||||
|
@ -53,6 +54,8 @@ def verify_backfill(namespace_name):
|
||||||
|
|
||||||
bytes_check = tag_manifest.manifest_bytes == repo_tag_manifest.json_data
|
bytes_check = tag_manifest.manifest_bytes == repo_tag_manifest.json_data
|
||||||
assert bytes_check, _vs(tag_manifest.manifest_bytes, repo_tag_manifest.json_data)
|
assert bytes_check, _vs(tag_manifest.manifest_bytes, repo_tag_manifest.json_data)
|
||||||
|
except TagManifest.DoesNotExist:
|
||||||
|
logger.info('No tag manifest found for repository tag %s', repo_tag.id)
|
||||||
|
|
||||||
mli = ManifestLegacyImage.get(manifest=tag_manifest)
|
mli = ManifestLegacyImage.get(manifest=tag_manifest)
|
||||||
assert mli.repository == repo_tag.repository
|
assert mli.repository == repo_tag.repository
|
||||||
|
|
Reference in a new issue