Currently, Freshmaker populates image["content_sets"] from Lightblue only and before it tries to build that image, it checks the content_sets.yml in distgit to find out if it should generate its own ODCS pulp compose or if OSBS will do it.
The issue with this is that when building unreleased image, the content_sets are not set in Lightblue and Lightblue class fallbacks to other less reliable methods of getting the content sets.
This PR moves the code to examine distgit from Errata handler to ContainerImage class. Benefits are following:
The code getting the image["content_sets"] is in the single place in ContainerImage class.
We can treat "content_sets.yml" as the primary source for image["content_sets"] and fallback easily to less reliable sources.
We can add image["content_sets_source"] to make it clear from where we got the content_sets.
As a side-effect of this move, the code which gets the data from distgit is now run in multiple threads and therefore it should handle rebuilds faster.
Currently, Freshmaker populates
image["content_sets"]from Lightblue only and before it tries to build that image, it checks thecontent_sets.ymlin distgit to find out if it should generate its own ODCS pulp compose or if OSBS will do it.The issue with this is that when building unreleased image, the content_sets are not set in Lightblue and Lightblue class fallbacks to other less reliable methods of getting the content sets.
This PR moves the code to examine distgit from Errata handler to
ContainerImageclass. Benefits are following:image["content_sets"]is in the single place inContainerImageclass.image["content_sets"]and fallback easily to less reliable sources.image["content_sets_source"]to make it clear from where we got the content_sets.