debian-forge-composer/cmd
Brian C. Lane 1096003598 store: Fix loading cross distro compose results
When the store is written to disk it simplifies the ImageBuild details
into a simple image type string. This works fine for composes that match
the host's distro but isn't enough detail to load composes made for
other distros, especially if the image type name isn't supported on the
host. This results in cross distro compose results being lost after a
reboot.

This fix uses the distro information from the compose's blueprint to
determine which distro the image type should be loaded from. It assumes
that the architecture matches the hosts' arch -- this is currently
always true but in the future if cross-arch builds are added it will
need to be addressed in a different way.

newComposeFromV0, newComposesFromV0, and newStoreFromV0 now take a
pointer to the full distro registry instead of an Arch, this allows them
to access the correct image types for the distro selected by the
blueprint. When loading the composes from disk the blueprint distro is
loaded from the registry before checking the image type string.

This means that we do not have to change the store version or on disk
format, the only thing changing is how it decides to populate the
ImageBuild when reloading the store.

A number of tests use a fake test distro using fake architecture names.
These tests have been adjusted to use a fake distro registry with
overridden host architecture that matches the fake one.
2022-11-03 08:39:22 +01:00
..
gen-manifests distro: replace ostree.RequestParams with new OSTreeImageOptions 2022-10-11 10:00:22 +02:00
mock-dnf-json mock-dnf-json: Add support for search command 2022-08-23 22:47:46 +01:00
osbuild-auth-tests golangci-lint: The parameters passed to exec.Command are safe 2022-09-15 03:57:40 -07:00
osbuild-composer osbuild-composer: Set ReadHeaderTimeout to 5s 2022-09-15 03:57:40 -07:00
osbuild-composer-cli-tests osbuild-composer-cli-tests: new weldr-client compatibility 2022-09-13 16:06:19 +01:00
osbuild-composer-dbjobqueue-tests dbjobqueue: use background context when closing listener 2022-09-02 12:52:50 +02:00
osbuild-composer-image-definitions Tools: fetch image test case generation matrix from composer 2022-05-13 21:01:37 +03:00
osbuild-composer-manifest-tests Manifests test: ensure that every image type has test coverage 2022-05-13 21:01:37 +03:00
osbuild-dnf-json-tests distro: replace ostree.RequestParams with new OSTreeImageOptions 2022-10-11 10:00:22 +02:00
osbuild-image-tests osbuild-image-tests: ignore LVM UUID 2022-07-12 13:28:36 +02:00
osbuild-koji koji: fix excessive logging & monitoring 2022-04-05 23:48:30 +02:00
osbuild-koji-tests gosec: G204 - Subproccess launched as function arg 2021-12-13 12:17:30 +02:00
osbuild-mock-openid-provider osbuild-composer: Set ReadHeaderTimeout to 5s 2022-09-15 03:57:40 -07:00
osbuild-package-sets distro: replace ostree.RequestParams with new OSTreeImageOptions 2022-10-11 10:00:22 +02:00
osbuild-pipeline distro: replace ostree.RequestParams with new OSTreeImageOptions 2022-10-11 10:00:22 +02:00
osbuild-playground osbuild: add extraEnv argument to RunOSBuild 2022-07-25 21:21:44 +02:00
osbuild-service-maintenance worker/server: requeue unresponsive jobs 2022-11-02 15:26:00 +01:00
osbuild-store-dump store: Fix loading cross distro compose results 2022-11-03 08:39:22 +01:00
osbuild-upload-aws osbuild-service-maintenance: Clean up expired images 2021-12-03 00:14:09 +00:00
osbuild-upload-azure azure: add an option to tag page blobs 2022-06-13 21:06:01 +02:00
osbuild-upload-container container/client: rework tls settings 2022-07-21 13:32:07 +02:00
osbuild-upload-gcp cmd/osbuild-upload-gcp: fix typo in skip-import's help string 2022-06-22 12:37:34 +02:00
osbuild-upload-generic-s3 awscloud: add option to mark S3 object as public 2022-09-19 22:56:36 +02:00
osbuild-upload-oci Add support for OCI upload provider 2022-01-28 15:16:47 +01:00
osbuild-worker internal/worker: add rhsm to ostree resolve job 2022-10-28 16:14:30 +02:00