#84 Start image rebuild when compose is done
Merged by jkaluza. Opened by cqi.
cqi/freshmaker start-rebuild-when-compose-is-done  into  master

Download 84.patch

Event parser and handler are created for handling ODCS state change
event. Waiting for and handling DONE event, that is compose for
rebuilding docker images is generated.

Original looping, that is used for blocking and waiting for generating
compose, is removed. In the meanwhile, repository file, that can be
passed to OSBS and used to build images, is returned as part of a new
compose created in ODCS. So, URL pointing to that repository is stored
in artifact build's build_args for saving time to retrieve compose
again when start to rebuild.

Signed-off-by: Chenxiong Qi cqi@redhat.com

I was thinking more about that and we will still have to ensure that the ODCS compose is valid and not expired and in case it is expired, we need to renew it. So in the end we will still nee to query ODCS before using the compose. Or we can store the expiration time here and check it later.

Looks good, just one comment to think about. I'm not sure if it needs to be fixed in this PR or not. Maybe we could.

We have discussed the problem with possibly expired composes and we will just renew the compose everytime we will use it and let ODCS to handle it. There is ODCS PR to handle this properly.

I'm +1 with merging this and do further changes in future PRs.

Pull-Request has been merged by jkaluza

Metadata