Optimize get_tag_image query

No caller uses the image placements or locations, so no need to load them.
This commit is contained in:
Joseph Schorr 2016-06-02 16:36:38 -04:00
parent 338f93c3c8
commit 53538f9001
4 changed files with 45 additions and 25 deletions

View file

@ -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