#62 Add LightBlue.find_parent_images_with_package to get the list of parent images containing the package
Merged by jkaluza. Opened by jkaluza.
jkaluza/freshmaker lb-get_parent-images  into  master

Download 62.patch

Why do we need that? When PHP is updated in the PHP Docker image, we will find out that there is Wordpress image (depending on PHP image). Simple rebuild of Wordpress image won't install PHP in the Wordpress image, because it takes it from the PHP image. We therefore have to rebuild PHP docker image and then Wordpress image.

To find out this order, we need to be able to inspect the parent images containing particular RPM and plan the rebuild in "batches" later. This PR implements a way how to find out the parents of particular image which need to be rebuilt to propagate the updated RPM down the Docker images stream.

Intentional?

Generally +1. Tested with a few images in dev2 and seems to work, including returning empty list for base image

Should this be len(parsed_data.layers) - 1?

How about to use same format as others to describe parameters and return value?

You mean the whitespace after '-' right? Yeah good catch I think

I feel a little difficult to understand this method, especially why need layers to find parent image. It would be nice to give an explanation of this method in docstring. I think maintenance could benefit from it in the future.

1 new commit added

  • Add LightBlue.find_images_to_rebuild(...) which returns images in the batches ordered by the rebuild order.

1 new commit added

  • Add LightBlue.find_parent_images_with_package to get the list of parent images containing the package

rebased

Improved the documentation and fixed the forgotten comment in requirements.txt.

Pull-Request has been merged by jkaluza

Metadata