andrey-pohilko/registry-cli

Keep-tags-list feature isn't working

kieranshaw opened this issue · 2 comments

I think the code that adds the found tags to the list of tags to keep isn't quite working:

tag like: feature.LRA-15993-icon-toggle
Adding feature.LRA-15993-icon-toggle.39 to tags list
Adding feature.LRA-15993-icon-toggle.33 to tags list
Adding feature.LRA-15993-icon-toggle.32 to tags list
Adding feature.LRA-15993-icon-toggle.31 to tags list
Adding feature.LRA-15993-icon-toggle.34 to tags list
Adding feature.LRA-15993-icon-toggle.40 to tags list
Adding feature.LRA-15993-icon-toggle.41 to tags list
Getting digests for tags to keep:
Getting digest for tag set([u'feature.LRA-15993-icon-toggle.39', u'feature.LRA-15993-icon-toggle.33', u'feature.LRA-15993-icon-toggle.32', u'feature.LRA-15993-icon-toggle.31', u'feature.LRA-15993-icon-toggle.34', u'feature.LRA-15993-icon-toggle.40', u'feature.LRA-15993-icon-toggle.41'])
tag digest not found: 404

I think the issue is the use of append rather than extends on the keep tags bit:

keep_tags.append(get_tags_like(args.keep_tags_like, tags_list))

should be

keep_tags.extend(get_tags_like(args.keep_tags_like, tags_list))

This will unpack the set of keep tags from keep_tags_like.

@kieranshaw changes applied and already in master.