#1072 Minor fixes to wait handler and KojiModuleBuilder
Merged 10 months ago by mprahl. Opened 10 months ago by cqi.
cqi/fm-orchestrator minor-fixes  into  master

@@ -178,7 +178,8 @@ 

  

          # These eventually get populated by calling _connect and __prep is set to True

          self.module_tag = None  # string

-         self.module_build_tag = None  # string

+         # A dict containing tag info returned from Koji API getTag.

+         self.module_build_tag = None

          self.module_target = None  # A koji target dict

  

          self.build_priority = config.koji_build_priority

@@ -206,9 +206,6 @@ 

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

          pass

  

-     tag = None

-     dependencies = []

- 

      resolver = module_build_service.resolver.system_resolver

  

      @module_build_service.utils.retry(

@@ -226,7 +223,7 @@ 

              # of the local module build based on Modulemd.Module, because the

              # local build is not stored in the external MBS and therefore we

              # cannot query it using the `query` as for Koji below.

-             dependencies = resolver.get_module_build_dependencies(

+             dep_koji_tags = resolver.get_module_build_dependencies(

                  mmd=build.mmd(), strict=True).keys()

  

              # We also don't want to get the tag name from the MBS, but just

@@ -239,7 +236,7 @@ 

              log.info("Getting deps for %s" % (nsvc))

              deps_dict = resolver.get_module_build_dependencies(

                  build.name, build.stream, build.version, build.context, strict=True)

-             dependencies = set(deps_dict.keys())

+             dep_koji_tags = set(deps_dict.keys())

  

              # Find out the name of Koji tag to which the module's Content

              # Generator build should be tagged once the build finishes.

@@ -254,10 +251,10 @@ 

              log.info('Getting tag for {0}'.format(nsvc))

              tag = generate_koji_tag(build.name, build.stream, build.version, build.context)

  

-         return dependencies, tag, cg_build_koji_tag

+         return dep_koji_tags, tag, cg_build_koji_tag

  

      try:

-         dependencies, tag, cg_build_koji_tag = _get_deps_and_tag()

+         dep_koji_tags, tag, cg_build_koji_tag = _get_deps_and_tag()

      except ValueError:

          reason = "Failed to get module info from MBS. Max retries reached."

          log.exception(reason)

@@ -280,9 +277,9 @@ 

      builder = module_build_service.builder.GenericBuilder.create_from_module(

          session, build, config)

  

-     log.debug("Adding dependencies %s into buildroot for module %s" % (dependencies, ':'.join(

+     log.debug("Adding dependencies %s into buildroot for module %s" % (dep_koji_tags, ':'.join(

          [build.name, build.stream, build.version])))

-     builder.buildroot_add_repos(dependencies)

+     builder.buildroot_add_repos(dep_koji_tags)

  

      if not build.component_builds:

          log.info("There are no components in module %r, skipping build" % build)

no initial comment

Commit 7fe4dc8 fixes this pull-request

Pull-Request has been merged by mprahl

10 months ago

Pull-Request has been merged by mprahl

10 months ago