Optimize get_tag_image query
No caller uses the image placements or locations, so no need to load them.
This commit is contained in:
parent
338f93c3c8
commit
53538f9001
4 changed files with 45 additions and 25 deletions
|
@ -98,7 +98,7 @@ class RepositoryTag(RepositoryParamResource):
|
|||
|
||||
original_image_id = None
|
||||
try:
|
||||
original_tag_image = model.tag.get_tag_image(namespace, repository, tag)
|
||||
original_tag_image = model.tag.get_repo_tag_image(image.repository, tag)
|
||||
if original_tag_image:
|
||||
original_image_id = original_tag_image.docker_image_id
|
||||
except model.DataModelException:
|
||||
|
|
|
@ -514,7 +514,7 @@ def delete_manifest_by_digest(namespace_name, repo_name, manifest_ref):
|
|||
|
||||
def _generate_and_store_manifest(namespace_name, repo_name, tag_name):
|
||||
# First look up the tag object and its ancestors
|
||||
image = model.tag.get_tag_image(namespace_name, repo_name, tag_name)
|
||||
image = model.tag.get_tag_image(namespace_name, repo_name, tag_name, include_storage=True)
|
||||
parents = model.image.get_parent_images(namespace_name, repo_name, image)
|
||||
|
||||
# If the manifest is being generated under the library namespace, then we make its namespace
|
||||
|
|
Reference in a new issue