]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
prune-quay.py: don't try to examine manifest-list tags 1759/head
authorDan Mick <dmick@redhat.com>
Mon, 8 Mar 2021 20:33:04 +0000 (12:33 -0800)
committerDan Mick <dmick@redhat.com>
Tue, 9 Mar 2021 03:22:42 +0000 (19:22 -0800)
They don't have image_ids, so don't consider them for "same as"
comparisons

Signed-off-by: Dan Mick <dmick@redhat.com>
quay-pruner/build/prune-quay.py

index 055d765207e4e60fdd4e23f9559c054f1173f6be..1e5a12e66eac9482b8609690d11e26a3b03c0ddc 100755 (executable)
@@ -243,9 +243,11 @@ def main():
             # the ref tag may already have been overwritten by a new
             # build of the same ref, but a different sha1. Delete it only
             # if it refers to the same image_id as the full tag.
-            names_of_same_image = \
-                [t['name'] for t in quaytags
-                 if t['image_id'] == tag['image_id']]
+            names_of_same_image = [
+                t['name'] for t in quaytags
+                if not t['is_manifest_list']
+                and t['image_id'] == tag['image_id']
+            ]
             if ref in names_of_same_image:
                 if args.verbose:
                     print('Marking %s for deletion' % name)