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: mark baseurl as required in repo schema #112

Merged
merged 2 commits into from
Jan 5, 2023

Conversation

thozza
Copy link
Member

@thozza thozza commented Nov 28, 2022

Previously it the repo schema didn't mark the baseurl property as
required, although Cloud API requires it and the builder code made
assumptions about it being always provided.

Mark baseurl property as required in the repo schema and add unit
test for it.

@thozza thozza requested review from gicmo and ondrejbudai and removed request for gicmo November 28, 2022 15:44
@thozza thozza requested review from ondrejbudai and removed request for gicmo January 2, 2023 14:06
@thozza thozza force-pushed the hub-repo-baseurl-schema branch from d0572e6 to a538c55 Compare January 2, 2023 15:53
thozza added 2 commits January 5, 2023 09:52
Reformat the code to be easier to read.
An empty dict was sometimes passed to `osbuildImage()` as the `priority`
argument, because `opts` were already part of `args`. Fix it.
Restructure `test_input_validation()` test to allow multiple test cases.

Signed-off-by: Tomáš Hozza <[email protected]>
Previously it the `repo` schema didn't mark the `baseurl` property as
required, although Cloud API "technically" requires it and the builder
code also made assumptions about it being always provided.

Note on Cloud API:
Cloud API requires that at least one of `baseurl`, `metalink` or
`mirrorlist` is specified for a repo. Since the plugin schema specifies
only `baseurl` as a property, it is as a result mandatory in order for
the Cloud API request to be valid and succeed.

Mark `baseurl` property as required in the `repo` schema and add unit
test for it.

Signed-off-by: Tomáš Hozza <[email protected]>
@thozza thozza force-pushed the hub-repo-baseurl-schema branch from a538c55 to a577f7c Compare January 5, 2023 08:52
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.

Splendid!

@ondrejbudai ondrejbudai merged commit 68ee7ee into osbuild:main Jan 5, 2023
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