debian-forge-composer/internal
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
..
artifact artifact: this represents the artifacts a manifest exports 2022-07-22 16:04:07 +02:00
auth go.mod: Update openshift-online/ocm-sdk-go 2022-05-19 22:18:42 +02:00
blueprint blueprints: Fix commit message when version is empty 2022-09-30 17:42:07 +02:00
boot azure: Add note that azure-sdk-for-go module is deprecated 2022-09-15 03:57:40 -07:00
client distro/*: allow /boot to be customized 2022-08-08 18:05:05 +02:00
cloud awscloud: add option to mark S3 object as public 2022-09-19 22:56:36 +02:00
cloudapi cloudapi: make location optional in Azure Upload Options 2022-10-27 19:33:43 +02:00
common common: define storage units as constants 2022-09-15 08:50:33 +02:00
container job/osbuild: move utility the container package 2022-08-01 21:50:03 +01:00
crypt crypt: add automatic darwin support 2020-07-17 07:48:22 +02:00
disk disk: add packages for LUKS containers 2022-09-13 16:06:19 +01:00
distro store: Fix loading cross distro compose results 2022-11-03 08:39:22 +01:00
distroregistry distroregistry: Add host's architecture name to the registry 2022-11-03 08:39:22 +01:00
dnfjson dnfjson: Add dnf-json result cache to BaseSolver 2022-09-15 11:34:39 +01:00
environment environment: encapsulate the environment images are deployed to 2022-07-07 12:00:56 +01:00
image image: make read only sysroot optional for OSTreeRawImage 2022-10-11 10:00:22 +02:00
jobqueue worker/server: requeue unresponsive jobs 2022-11-02 15:26:00 +01:00
jsondb test: use T.TempDir to create temporary test directory 2022-04-05 09:27:43 +02:00
manifest manifest: remove private osTreeCommit type 2022-10-11 10:00:22 +02:00
mocks mocks/dnfjson: Add mock support for the search command 2022-08-23 22:47:46 +01:00
osbuild internal/osbuild: contenturl and rhsm secrets for ostree sources 2022-10-28 16:14:30 +02:00
oscap oscap: add oscap package 2022-08-04 18:19:06 +02:00
ostree internal/ostree: add consumer certs when resolving ostree ref 2022-10-28 16:14:30 +02:00
platform platform: fix error message for invalid image format 2022-09-13 16:06:19 +01:00
prometheus metrics: build jobs arch label 2022-07-27 13:37:14 +02:00
reporegistry reporegistry: remove unused ReposByArch() function 2022-03-09 23:22:06 +00:00
rhsm internal/rhsm: add consumer secrets to Subscriptions 2022-10-28 16:14:30 +02:00
rpmmd Rename osbuild2 package to osbuild 2022-07-14 16:54:00 +02:00
runner runner: introduce runner abstraction 2022-07-12 08:19:57 +01:00
store store: Fix loading cross distro compose results 2022-11-03 08:39:22 +01:00
target internal/target/azure_image: mark Location as optional 2022-10-27 19:33:43 +02:00
test cloudapi: run all Koji compose unit tests 2022-06-10 14:48:18 +01:00
upload internal/upload/azure: make location optional in various methods 2022-10-27 19:33:43 +02:00
users users: convenience functions for converting from BP 2022-09-13 16:06:19 +01:00
weldr store: Fix loading cross distro compose results 2022-11-03 08:39:22 +01:00
worker worker/server: requeue unresponsive jobs 2022-11-02 15:26:00 +01:00
workload workload: introduce abstraction to encapsulate image workloads 2022-07-07 12:00:56 +01:00
tools.go go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00