Lightblue.find_images_to_rebuild now accepts list of SRPMs to look for in Lightblue. Previously, we was calling find_images_to_rebuild for each SRPM separately, which a) took long time to finish for advisories with multiple SRPMs and b) it was hard to merge multiple batches lists together and we actually never tried that to do it in some reproducible way.
Therefore, the LB queries changes to query for multiple SRPMs in the single LB calls.
Sorting by NVR in Lightblue was broken, because it just did string-based sorting, so foo-1-10 < foo-1-2 was True. The sorted_by_nvr is introduced to fix this.
-Lightblue._deduplicate_images_to_rebuild was broken in case more than 1 duplicated image was in the list.
Batches generated by Lightblue.find_images_to_rebuild were broken in case we wanted to rebuild images A depends on B and also A. In this case, A was added to batches twice.
This PR changes following:
Lightblue.find_images_to_rebuildnow accepts list of SRPMs to look for in Lightblue. Previously, we was callingfind_images_to_rebuildfor each SRPM separately, which a) took long time to finish for advisories with multiple SRPMs and b) it was hard to merge multiple batches lists together and we actually never tried that to do it in some reproducible way.Lightbluewas broken, because it just did string-based sorting, sofoo-1-10 < foo-1-2was True. Thesorted_by_nvris introduced to fix this.-
Lightblue._deduplicate_images_to_rebuildwas broken in case more than 1 duplicated image was in the list.Lightblue.find_images_to_rebuildwere broken in case we wanted to rebuild imagesA depends on Band alsoA. In this case,Awas added to batches twice.