-
Notifications
You must be signed in to change notification settings - Fork 16
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
Various fixes #108
Various fixes #108
Conversation
thozza
commented
Oct 25, 2022
- builder: fix missing default value for details in ComposeStatusError
- hub: make bucket optional for GCPUploadOptions
- hub: make location optional for AzureUploadOptions
I had to update the terraform SHA, because the one currently on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch, thanks!
CI revealed an issue in the schema. By making the bucket optional for GCP upload options and using |
Yeah, osbuild/osbuild-composer#3018 might fix it I think. |
I don't think so. The issue happens in the hub plugin, which reports issue when trying to validate a request against schema. The issue is that it matches two of the options, which is in conflict with the |
To sum up the schema issue that manifested after I marked more properties from
After discussing our options with @ondrejbudai, we agreed that falling back to defining After thinking about this more, I realized that there is a compromise between completely reworking schema and using an empty object with additional properties. That's to use |
b88c9ff
to
042f135
Compare
The builder plugin could produce a traceback when image build failed, but it didn't contain any details. ``` Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/koji/daemon.py", line 1468, in runTask response = (handler.run(),) File "/usr/lib/python3.6/site-packages/koji/tasks.py", line 335, in run return koji.util.call_with_argcheck(self.handler, self.params, self.opts) File "/usr/lib/python3.6/site-packages/koji/util.py", line 271, in call_with_argcheck return func(*args, **kwargs) File "/usr/lib/koji-builder-plugins/osbuild.py", line 719, in handler status = client.wait_for_compose(cid, callback=self.on_status_update) File "/usr/lib/koji-builder-plugins/osbuild.py", line 483, in wait_for_compose status = self.compose_status(compose_id) File "/usr/lib/koji-builder-plugins/osbuild.py", line 454, in compose_status return ComposeStatus.from_dict(res.json()) File "/usr/lib/koji-builder-plugins/osbuild.py", line 251, in from_dict ImageStatus.from_dict(s) for s in data["image_statuses"] File "/usr/lib/koji-builder-plugins/osbuild.py", line 251, in <listcomp> ImageStatus.from_dict(s) for s in data["image_statuses"] File "/usr/lib/koji-builder-plugins/osbuild.py", line 228, in from_dict error = ComposeStatusError(error_id=error_id, **error) TypeError: __init__() missing 1 required positional argument: 'details' ``` Signed-off-by: Tomáš Hozza <thozza@redhat.com>
The GCP Bucket may be (and usually will be) set on the composer-worker. Related to osbuild/osbuild-composer#3023. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
The Azure Resource Group Location is no longer required and osbuild-composer can determine the correct Location from the provided Resource Group. Related to osbuild/osbuild-composer#3093. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
It turned out, that the upload options for AWS EC2 or GCP with just the required properties specified, would match both schemas. This is causing the validation fail with `oneOf` used for `upload_options`. This will be fixed in osbuild-composer PR#3018. However, we can't use the same approach for koji-osbuild, while keeping the schema backward compatible and sane. Another discussed option would be to define `upload_options` as an empty object with `additionalProperties` set to `True`. This would effectively mean no validation of `upload_options`. None of the plugins actually modify the `upload_options` in any way. It is passed as provided to `osbuild-composer`. I think that the change in this commit is a compromise. The validation of the `upload_options` schema is kept, but it is relaxed to `anyOf`. [1] osbuild/osbuild-composer#3018 Signed-off-by: Tomáš Hozza <thozza@redhat.com>
042f135
to
4895b00
Compare