Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hub: support image_type being an array for backwards compatibility #107

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

thozza
Copy link
Member

@thozza thozza commented Sep 1, 2022

The support for specifying multiple image_types for a single compose
has been removed by [1]. This turned out to be problematic, because e.g.
Pungi uses the array type when triggering image builds via osbuild.

Bring back the support for specifying the image_type as an array, but
restrict it to a single item. This will cover the Pungi use-case, since
it is always passing a single image_type in the array. The array is
then converted to a string in the Hub plugin and passed as such to the
Builder plugin.

Extend unit tests covering the introduced compatibility layer.

[1] c725265

@thozza thozza force-pushed the image-types-array-compat branch 3 times, most recently from f9fb404 to 16a7efd Compare September 2, 2022 06:37
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

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

Very nice! Just one docs update requested. :)

plugins/hub/osbuild.py Outdated Show resolved Hide resolved
@thozza thozza force-pushed the image-types-array-compat branch 2 times, most recently from 6b7a22c to 1a60801 Compare September 2, 2022 08:11
The support for specifying multiple `image_types` for a single compose
has been removed by [1]. This turned out to be problematic, because e.g.
Pungi uses the array type when triggering image builds via osbuild.

Bring back the support for specifying the `image_type` as an array, but
restrict it to a single item. This will cover the Pungi use-case, since
it is always passing a single `image_type` in the array. The array is
then converted to a string in the Hub plugin and passed as such to the
Builder plugin.

Extend unit tests covering the introduced compatibility layer.

[1] osbuild@c725265
@ondrejbudai ondrejbudai merged commit f21a2de into osbuild:main Sep 2, 2022
@thozza thozza deleted the image-types-array-compat branch September 2, 2022 13:41
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.

2 participants