#1073 FACTORY-1935: limit Koji build architectures
Merged 5 months ago by mprahl. Opened 5 months ago by vmaljulin.
vmaljulin/fm-orchestrator FACTORY-1935  into  master

file modified
+1

@@ -29,6 +29,7 @@ 

      KOJI_CONFIG = '/etc/module-build-service/koji.conf'

      KOJI_PROFILE = 'koji'

      ARCHES = ['i686', 'armv7hl', 'x86_64']

+     ALLOW_ARCH_OVERRIDE = False

      KOJI_REPOSITORY_URL = 'https://kojipkgs.fedoraproject.org/repos'

      KOJI_TAG_PREFIXES = ['module']

      KOJI_ENABLE_CONTENT_GENERATOR = True

@@ -755,9 +755,16 @@ 

              else:

                  module_target = self.module_target['name']

  

-             build_opts = {"skip_tag": True,

-                           "mbs_artifact_name": artifact_name,

-                           "mbs_module_target": module_target}

+             build_opts = {

+                 "skip_tag": True,

+                 "mbs_artifact_name": artifact_name,

+                 "mbs_module_target": module_target

+             }

+ 

+             # disabled by default, wouldn't work until Koji issue #1158 is done

+             if conf.allow_arch_override:

+                 build_opts['arch_override'] = \

+                     self.mmd.get_rpm_components()[artifact_name].get_arches().get()

  

              task_id = self.koji_session.build(source, module_target, build_opts,

                                                priority=self.build_priority)

@@ -179,6 +179,10 @@ 

              'type': list,

              'default': [],

              'desc': 'Koji architectures.'},

+         'allow_arch_override': {

+             'type': bool,

+             'default': False,

+             'desc': 'Allow to support a custom architecture set'},

          'koji_build_priority': {

              'type': int,

              'default': 10,

Reviving pull-request https://pagure.io/fm-orchestrator/pull-request/1045
Now 'arch_override' will only be added when 'allow_arch_override' option is enabled.

@jkaluza is there any plan to support this in Koji?

In koji for rpm and container builds, arch override is only allowed for scratch builds. I'm not exactly sure why. This change seems to follow a different pattern. I don't have any strong concerns, just pointing out context.

Code looks good to me.

@lucaraval that was the reason for creating an option for this feature.

1 new commit added

  • `fixup! Merge #1070Refactor SCM.get_latest```
5 months ago

rebased onto 377f1f4346498fe39ed9d62df70e41dabe628286

5 months ago

@vmaljulin is there a ticket somewhere requesting this feature in Koji? Otherwise it seems odd to add code that will not work.

TODO: add koji issue link to code (note from standup)

rebased onto 6b7ea33

5 months ago

koji issue was added to code

Pull-Request has been merged by mprahl

5 months ago