#569 Enable koji content generator code
Merged 6 years ago by ralph. Opened 6 years ago by sochotni.
sochotni/fm-orchestrator content-generators  into  master

Enable koji content generator code
Stanislav Ochotnicky • 6 years ago  
file modified
+1
@@ -32,6 +32,7 @@ 

      KOJI_PROXYUSER = True

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

      KOJI_TAG_PREFIXES = ['module']

+     KOJI_ENABLE_CONTENT_GENERATOR = True

      COPR_CONFIG = '/etc/module-build-service/copr.conf'

      PDC_URL = 'http://pdc.fedoraproject.org/rest_api/v1'

      PDC_INSECURE = True

@@ -186,6 +186,11 @@ 

              'default': 24*3600,

              'desc': 'Time in seconds after which the Koji target of '

                  'built module is deleted'},

+         'koji_enable_content_generator': {

+             'type': bool,

+             'default': True,

+             'desc': 'Enable or disable imports to koji using content '

+                 'generator api'},

          'allow_custom_scmurls': {

              'type': bool,

              'default': False,

@@ -30,6 +30,7 @@ 

  import module_build_service.messaging

  from module_build_service.utils import (

      start_next_batch_build, attempt_to_reuse_all_components)

+ from module_build_service.builder.KojiContentGenerator import KojiContentGenerator

  

  from requests.exceptions import ConnectionError

  
@@ -120,6 +121,11 @@ 

          # This is ok.. it's a race condition we can ignore.

          pass

  

+     if config.system == 'koji' and config.koji_enable_content_generator:

+         # KojiContentGenerator import

+         cg = KojiContentGenerator(build, config)

+         cg.koji_import()

+ 

      build.transition(config, state="ready")

      session.commit()

  

This is now configurable so it can be disabled if needed

This should be guarded by if conf.system == "koji". We do not want to run this for Copr or Mock builders. This will also fix the problem with test_build, which is running as Mock backend.

rebased

6 years ago

rebased

6 years ago

Am I correct that this is currently blocked on https://pagure.io/releng/issue/6799 ?

You are - I was invited to grooming meeting earlier today but that ended up being the wrong meeting (again). So I am expecting another invite to a meeting tomorrow evening (a scrum/standup I believe)

rebased

6 years ago

+1 from me. Is there a reason why this is turned off in dev?

rebased

6 years ago

There was a reason - a mistake :-) I was thinking of test environment with test builder setup

Pull-Request has been merged by ralph

6 years ago