| |
@@ -219,6 +219,7 @@
|
| |
if extra_image.get("odcs", {}).get("compose_ids"):
|
| |
data["odcs_compose_ids"] = extra_image["odcs"]["compose_ids"]
|
| |
|
| |
+ data["parent_build_id"] = extra_image.get("parent_build_id")
|
| |
data["parent_image_builds"] = extra_image.get("parent_image_builds")
|
| |
|
| |
brew_task = session.get_task_request(
|
| |
@@ -1269,7 +1270,7 @@
|
| |
return parent_brew_build
|
| |
# We need to resolve the image in here because "parent_image_builds" needs to be there
|
| |
# and it gets populated when the image gets resolved.
|
| |
- child_image.resolve_commit()
|
| |
+ child_image.resolve(self)
|
| |
# If the parent is not in `parent_brew_build` we can try to look for the parent in Brew,
|
| |
# using the field `parent_image_builds` (searching for the nvr), which should always be there.
|
| |
# In case parent_brew_build is None and child_image["parent_image_builds"] == {},
|
| |
@@ -1296,15 +1297,18 @@
|
| |
images = []
|
| |
parent_image = None
|
| |
|
| |
- children = images if images else [child_image]
|
| |
# We first try to find the parent from the `parent_brew_build` field in Lightblue.
|
| |
parent_brew_build = self.find_parent_brew_build_nvr_from_child(child_image)
|
| |
# We've reached the base image, stop recursion
|
| |
if not parent_brew_build:
|
| |
- return children
|
| |
+ return images
|
| |
parent_image = self.get_images_by_nvrs([parent_brew_build], srpm_names=[srpm_name], published=None)
|
| |
|
| |
if parent_image:
|
| |
+ # In some cases, an image may not have its content sets defined. To
|
| |
+ # circumvent this gap, we use the list of child images when calling
|
| |
+ # resolve so their content sets can be used.
|
| |
+ children = images if images else [child_image]
|
| |
parent_image = parent_image[0]
|
| |
parent_image.resolve(self, children)
|
| |
|
| |