debian-forge-composer/internal/target
Tomáš Hozza d7e59e6eec Worker: move GCE image guest OS features to upload target options
Previously, the worker was determining the GCE image guest OS Features
on its own, based on the OS name. This caused problems, in case the
osbuild-composer was of a newer version than the worker.

Example:
osbuild-composer contained support for c10s GCE image type and its
implementation also contained the proper guest OS Features list for it.
However, when the worker got the osbuild job, it built it and tried to
fetch the guest OS Features for the distro. Since its implementation was
too old, it didn't contain the code that added the actual support for
c10s GCE images and got no guest OS features list (which is the default
for unsupported distros). The image was successfully uploaded and
shared, but it does not boot in GCP, because it does not know that it
should use UEFI to boot it.

This behavior could be considered a bug. The worker should be dumb. It
should not be making decisions about the image features, but instead it
should take them from the upload target options. And composer should be
the authoritative source of truth for this. Because otherwise, we
basically have two components that need to be updated in sync to add
support for GCE images on a new distro.

Move the GCE image guest OS features to the GCP upload target options.
The worker will just take what is specified there and use it when
importing the image to GCP. As a compatibility layer for the case when
the composer would be older than the worker (unlikely, but still),
worker will try to determine the image guest OS features in case the
list in the upload target options is empty.

Extend the GCP functional tests to check that the imported image has at
least some guest OS features set.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-08-29 17:37:48 +02:00
..
aws_target.go Target: expose osbuild artifact information in target result 2023-09-27 12:39:28 +02:00
azure_image_target.go Target: expose osbuild artifact information in target result 2023-09-27 12:39:28 +02:00
azure_target.go Target: expose osbuild artifact information in target result 2023-09-27 12:39:28 +02:00
container_target.go Target: expose osbuild artifact information in target result 2023-09-27 12:39:28 +02:00
gcp_target.go Worker: move GCE image guest OS features to upload target options 2024-08-29 17:37:48 +02:00
koji_target.go Worker/osbuild: include Manifest info in Koji target result 2023-09-27 12:39:28 +02:00
koji_target_test.go Target/Koji: rework result options to contain more than just image info 2023-09-27 12:39:28 +02:00
local_target.go target: deprecate local target and don't use it anywhere 2022-07-01 18:55:01 +01:00
oci_target.go Target: expose osbuild artifact information in target result 2023-09-27 12:39:28 +02:00
pulp_target.go target: add pulp ostree target and options 2023-10-18 21:14:46 +02:00
target.go target: add the pulp.ostree target to the marshal functions 2023-10-18 21:14:46 +02:00
target_test.go worker: move osbuild exports from OSBuildJob to target 2022-07-01 18:55:01 +01:00
targetresult.go target: add the pulp.ostree target to the marshal functions 2023-10-18 21:14:46 +02:00
targetresult_test.go clienterrors: rename WorkerClientError to clienterrors.New 2024-07-31 17:04:58 +02:00
vmware_target.go Target: expose osbuild artifact information in target result 2023-09-27 12:39:28 +02:00
worker_server_target.go Target: expose osbuild artifact information in target result 2023-09-27 12:39:28 +02:00