debian-forge-composer/internal
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
..
auth go.mod: Update openshift-online/ocm-sdk-go 2022-05-19 22:18:42 +02:00
blueprint blueprint: sanitize user home directories 2022-03-28 14:08:57 +02:00
boot Move GetRedHatRelease() and GetHostDistroName() to common package 2022-06-10 14:48:18 +01:00
client tests: use TestMain() instead of Init() to compile mock-dnf-json 2022-06-01 11:36:52 +01:00
cloud Upload to HTTPS S3 - Support self signed certificate 2022-05-26 13:46:00 +03:00
cloudapi worker/osbuild: consolidate Koji target options values meaning 2022-06-17 17:37:15 +02:00
common Move GetRedHatRelease() and GetHostDistroName() to common package 2022-06-10 14:48:18 +01:00
crypt crypt: add automatic darwin support 2020-07-17 07:48:22 +02:00
disk disk: test minimum directory size calculations 2022-04-29 08:55:36 +02:00
distro distro: use GenSources in Manifest() creation methods 2022-06-15 20:13:47 +02:00
distroregistry Move GetRedHatRelease() and GetHostDistroName() to common package 2022-06-10 14:48:18 +01:00
dnfjson rpmmd: add IgnoreSSL field to PackageSpec 2022-06-15 20:13:47 +02:00
jobqueue osbuild-service-maintenance: Vacuum tables 2022-06-08 21:12:46 +02:00
jsondb test: use T.TempDir to create temporary test directory 2022-04-05 09:27:43 +02:00
kojiapi worker: define job types as constants 2022-06-10 14:48:18 +01:00
mocks dnfjson: drop repo checksums 2022-06-01 11:36:52 +01:00
osbuild1 osbuild1: remove UnmarshalJSON for Stage and StageOptions 2022-06-13 21:00:40 +01:00
osbuild2 osbuild2: set the Insecure option for curl sources 2022-06-15 20:13:47 +02:00
ostree ostree: add new CommitSource type 2022-06-15 20:13:47 +02:00
prometheus prometheus: add tenant label 2022-06-07 16:35:03 +02:00
reporegistry reporegistry: remove unused ReposByArch() function 2022-03-09 23:22:06 +00:00
rhsm internal/rhsm: implement fallback to the previous mechanism 2021-08-09 12:40:23 +02:00
rpmmd rpmmd: add IgnoreSSL field to PackageSpec 2022-06-15 20:13:47 +02:00
store distro/fedora: refactor based on RHEL 9.0 code 2022-05-09 12:25:21 +02:00
target worker/osbuild: consolidate Koji target options values meaning 2022-06-17 17:37:15 +02:00
test cloudapi: run all Koji compose unit tests 2022-06-10 14:48:18 +01:00
upload azure: add an option to tag page blobs 2022-06-13 21:06:01 +02:00
weldr worker: define job types as constants 2022-06-10 14:48:18 +01:00
worker cloudapi: add EnsureJobChannel() middleware to verify job channel 2022-06-10 14:48:18 +01:00
tools.go go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00