adamwill commented on the pull-request: `Switch Fedora Cloud and Container builds to use
kiwibuild` that you are following:
``
We also worked out that the `factory-parameters` dicts do nothing for kiwi builds. how
those work is:
* pungi writes them into a config file it passes to koji - e.g. in [today's
compose](https://kojipkgs.fedoraproject.org/compose/rawhide/Fedora-Rawhid...,
pungi ran `koji --profile=compose_koji image-build
--config=/mnt/koji/compose/rawhide/Fedora-Rawhide-20240306.n.0/work/image-build/Container/docker_Fedora-Container-Base_aarch64-ppc64le-s390x-x86_64.cfg
--wait`. That file can be seen
[
here](https://kojipkgs.fedoraproject.org/compose/rawhide/Fedora-Rawhide-2...,
and you can see it has a `[factory-parameters]` section
* The Koji code that handles the `image-build` subcommand [reads that config file and
passes the factory-parameters values into the options for the
task](https://pagure.io/koji/blob/7d126abe91e91eed75ad3e6e995e4b0e3eccf01c/f/cli/koji_cli/commands.py#_6034)
as a list called `task_options.factory_parameter`
* That code then calls `_build_image_oz()` with those task options, which creates a
`buildImageOz` instance with the `factory_parameter` opt list in its `opts`
* `buildImageOz`
([here](https://pagure.io/koji/blob/7d126abe91e91eed75ad3e6e995e4b0e3eccf01c/f/kojihub/kojihub.py#_10660))
passes the opts through to `make_task`, which...does a lot of stuff! It all gets
complicated here and I am not gonna trace it all the way out, but it's clear that we
wind up with a `BaseImageTask`
([here](https://pagure.io/koji/blob/7d126abe91e91eed75ad3e6e995e4b0e3eccf01c/f/builder/kojid#_4188)),
which has a `_mergeFactoryParams()` method that actually reads in the factory parameters.
It's called by `_buildBase()` and `_do_target_image()` methods, which pass them on to
ImageFactory methods (`imgfac.BuildDispatcher.builder_for_base_image()` or
`imgfac.BuildDispatcher.builder_for_target_image()`)
Point being, all of this is completely oz/ImageFactory-specific code paths.
Looking into how this works on the Kiwi codepath, well, this `factory-parameters` stuff
just is not handled at any level on that codepath. The Pungi `kiwibuild` phase definition
does not do anything with it. The Koji kiwi plugin's CLI command parser does not read
config files or do anything at all with the word 'factory' in it. The Kiwi image
build tasks similarlly don't.
But also, uh...it means this PR is actually wrong in another way. We can't have the
variant lists be lists of dicts with `kiwibuild` and optional `factory-parameters` keys
like they are in this PR, that is not what the `kiwibuild` phase expects. It's one
level too much nesting. If you look at [the config @lsedlar used for the test
compose](https://pagure.io/pungi/pull-request/1720#comment-199218), it doesn't look
like that. The variant lists need to just be lists of image dicts. So it should be
something like:
kiwibuild = {
'^Cloud$': [
{
'kiwi_profile': 'Cloud-Base-Generic',
'arches': ['aarch64', 'ppc64le',
'x86_64'],
'repos': ['Everything'],
'subvariant': 'Cloud_Base',
'failable': ['ppc64le'],
},
{
'kiwi_profile': 'Cloud-Base-AmazonEC2',
'arches': ['aarch64', 'x86_64'],
'repos': ['Everything'],
'subvariant': 'Cloud_Base',
'failable': ['*'],
},
rather than the way it is now.
``
To reply, visit the link below or just reply to this email
https://pagure.io/pungi-fedora/pull-request/1248