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

The hub plugin should not allow submitting tasks with duplicate architectures #123

Open
thozza opened this issue Aug 2, 2023 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@thozza
Copy link
Member

thozza commented Aug 2, 2023

None of the plugins (hub, builder) check if the architecture list provided in the task contains duplicate architectures. IOW, one can submit a task with three architectures specified and all of them being the same architecture (e.g. 3x x86_64).

The osbuild-composer will accept such request just fine and it will build 3x the same image and upload it to Koji in overwriting mode (osbuild/osbuild-composer@bd7f074).

The build itself will most probably blow up in the KojiFinalize job when the osbuild-composer worker calls CGImport while specifying multiple outputs to import. All of them would reference the same filename, but the checksum will most probably differ (due to different timestamps and some UUIDs in the image).

The hub plugin should ideally check if the provided architectures list contains duplicates and return an error to the caller.

@thozza thozza added bug Something isn't working good first issue Good for newcomers labels Aug 2, 2023
@thozza
Copy link
Member Author

thozza commented Aug 2, 2023

JSON schema should be able to check for this case -> https://json-schema.org/understanding-json-schema/reference/array.html?highlight=unique#id13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant