debian-forge-composer/cmd
Tomas Hozza fd82174469 worker/osbuild: consolidate Koji target options values meaning
When the Koji target support was added to the osbuild job, based on the
osbuild-koji job, the meaning of target option values got messed up.

The side effect of the issue is that when Koji composes are
submitted via Cloud API the resulting image is currently always uploaded
back to the worker server.

`OsBuildKoji` job
-----------------
- `OSBuildKojiJob.ImageName` is set to the filename of the image as
  exported by osbuild.
- `OSBuildKojiJob.KojiFilename` is set to the desired filename which
  should be used when uploading the image to Koji.

`OsBuild` job + `KojiTargetOptions` before
------------------------------------------
- `OSBuildJob.ImageName` is set to the filename of the image as exported
  by osbuild. This is done only by the Cloud API code for Koji composes.
  Cloud API does not set this for regular composes and any other target.
  The variable is set in common case only by Weldr API code with the
  same meaning and it is used by the `OsBuild` job implementation as an
  indication that the image should be uploaded back to the worker server.
- `Target.ImageName` is not set at all. Other targets use it for the
  desired filename which should be used when uploading the image to the
  target environment.
- `KojiTargetOptions.Filename` is set to the desired filename which
  should be used when uploading the image to Koji. All other target
  types use `Filename` variable in their options for the filename of the
  image as exported by osbuild.

`OsBuild` job + `KojiTargetOptions` after
-----------------------------------------
- `OSBuildJob.ImageName` is still set to the filename of the image as
  exported by osbuild. This is kept for a backward compatibility of new
  composer with older workers.
- `Target.ImageName` is set to the desired filename which should be used
  when uploading the image to Koji.
- `KojiTargetOptions.Filename` is set to the filename of the image as
  exported by osbuild.

This change is backward incompatible, meaning that old worker won't be
able to handle Koji compose requests submitted via Cloud API using a new
composer and also a new worker won't be able to handle Koji compose
requests submitted by a new composer. This is intentional, because after
discussion with Ondrej Budai, the Cloud API Koji integration is
currently not used anywhere in production.
2022-06-17 17:37:15 +02:00
..
cloud-cleaner cloud-cleaner: clean up GCE instances in all regions and zones 2022-05-17 12:18:12 +02:00
gen-manifests gen-manifests: print message about leftover caches 2022-06-10 12:45:41 +01:00
mock-dnf-json dnfjson: use repo config hash as repo ID 2022-06-01 11:36:52 +01:00
osbuild-auth-tests osbuild-auth-tests: add a build constraint also to certificates.go 2021-12-18 11:56:17 +00:00
osbuild-composer composer+worker: make dnf-json path externally configurable 2022-06-01 11:36:52 +01:00
osbuild-composer-cli-tests gosec: G204 - Subproccess launched as function arg 2021-12-13 12:17:30 +02:00
osbuild-composer-dbjobqueue-tests dbjobqueue: Filter maintenance queries based on results 2022-06-08 21:12:46 +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 dnfjson: drop repo checksums 2022-06-01 11:36:52 +01:00
osbuild-image-tests distro: housekeeping with cpu arch and arch.Name() 2022-05-10 19:53:41 +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 go.mod: Update openshift-online/ocm-sdk-go 2022-05-19 22:18:42 +02:00
osbuild-package-sets simplify package set chain handling 2022-06-01 11:36:52 +01:00
osbuild-pipeline dnfjson: cache cleanup 2022-06-01 11:36:52 +01:00
osbuild-service-maintenance worker: define job types as constants 2022-06-10 14:48:18 +01:00
osbuild-store-dump dnfjson: drop repo checksums 2022-06-01 11:36:52 +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-gcp cmd/osbuild-upload-gcp: use ComputeImageInsert() 2022-04-14 19:07:31 +01:00
osbuild-upload-generic-s3 Upload to HTTPS S3 - Support self signed certificate 2022-05-26 13:46:00 +03:00
osbuild-upload-oci Add support for OCI upload provider 2022-01-28 15:16:47 +01:00
osbuild-worker worker/osbuild: consolidate Koji target options values meaning 2022-06-17 17:37:15 +02:00