Skip to content

Commit

Permalink
Allow skopeo inspect to check for images for any arch (#588)
Browse files Browse the repository at this point in the history
When '--raw' option was not given in inspect, skopeo tries to look
for manifest of amd64 arch, but some images are built for other
arches only, hence skopeo inspect was failing

Co-authored-by: Tulsi Chandwani <[email protected]>
  • Loading branch information
chandwanitulsi and Tulsi Chandwani authored Nov 22, 2023
1 parent e83cf53 commit 875b3e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion iib/workers/tasks/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ def inspect_related_images(bundles: List[str], request_id) -> None:
for related_image in bundle_metadata['found_pullspecs']:
related_image_pull_spec = related_image.to_str()
try:
skopeo_inspect(f"docker://{related_image_pull_spec}")
skopeo_inspect(f'docker://{related_image_pull_spec}', '--raw')
except IIBError as e:
log.error(e)
invalid_related_images.append(related_image_pull_spec)
Expand Down
1 change: 1 addition & 0 deletions tests/test_workers/test_tasks/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,7 @@ def test_inspect_related_images(mock_gil, mock_cffi, mock_fd, mock_gbd, mock_si,
build.inspect_related_images(bundles=bundles, request_id=request_id)

assert mock_si.call_count == 5
mock_si.assert_any_call('docker://quay.io/related/image@sha256:5', '--raw')
assert mock_gbd.call_count == 2
assert mock_gil.call_args_list == [
mock.call(
Expand Down

0 comments on commit 875b3e3

Please sign in to comment.