#277 Move the code to examine container's content_sets.yml and container.yaml to ContainerImage class.
Merged by jkaluza. Opened by jkaluza.
jkaluza/freshmaker ccache-per-thread  into  master

Download 277.patch

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.

Ack - we're planning to replace this with a HTTP call to dist-git at some point iirc. I see this is a copy/paste from errata_advisory_rpms_signed.py

Commit b3109e1e fixes this pull-request

Pull-Request has been merged by jkaluza

Pull-Request has been merged by jkaluza

Metadata