Skip to content

imgtestlib: handle manifests without org.osbuild.curl sources#2408

Closed
lzap wants to merge 1 commit into
osbuild:mainfrom
lzap:fix-bootc-curl-keyerror
Closed

imgtestlib: handle manifests without org.osbuild.curl sources#2408
lzap wants to merge 1 commit into
osbuild:mainfrom
lzap:fix-bootc-curl-keyerror

Conversation

@lzap

@lzap lzap commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

The can_boot_test() function assumed network-installer manifests always have org.osbuild.curl sources containing ssh-server packages. However, bootc-based images don't use curl sources and have a different manifest structure.

osbuild/bootc-foundry#96

The can_boot_test() function assumed network-installer manifests
always have org.osbuild.curl sources containing ssh-server packages.
However, bootc-based images don't use curl sources and have a
different manifest structure.

This commit adds a check to handle manifests that lack the
org.osbuild.curl key gracefully. If the key is missing, the function
returns True (bootable) since the ssh-server check only applies to
network-installer types.

Fixes KeyError when testing bootc qcow2 images.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@lzap lzap requested review from a team, achilleas-k and thozza as code owners June 9, 2026 12:55
@lzap lzap requested a review from croissanne June 9, 2026 12:55
Comment on lines +432 to +433
if "org.osbuild.curl" not in manifest_data.get("sources", {}):
return True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bootc is actually bootable without any curl source. Data come in a different way (container repo ref).

@thozza

thozza commented Jun 9, 2026

Copy link
Copy Markdown
Member

maybe let's use da4ea14

@lzap

lzap commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Since there is prior art, I am closing in favour to #2406

@lzap lzap closed this Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants