From f478e6930709d3cf145ae8ad611509a1c871cadb Mon Sep 17 00:00:00 2001 From: mprahl Date: Fri, 8 Dec 2017 16:07:32 -0500 Subject: [PATCH] Clarify and add log statements when an orphaned module-build-macros is used --- module_build_service/scheduler/handlers/modules.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/module_build_service/scheduler/handlers/modules.py b/module_build_service/scheduler/handlers/modules.py index e4e2f220..758a1de3 100644 --- a/module_build_service/scheduler/handlers/modules.py +++ b/module_build_service/scheduler/handlers/modules.py @@ -298,12 +298,6 @@ def wait(config, session, msg): session.commit() return [] - # Build the module-build-macros - # inject dist-tag into buildroot - srpm = builder.get_disttag_srpm( - disttag=".%s" % get_rpm_release_from_mmd(build.mmd()), - module_build=build) - log.debug("Starting build batch 1") build.batch = 1 session.commit() @@ -314,6 +308,9 @@ def wait(config, session, msg): session, artifact_name, build.id) further_work = [] if not component_build: + srpm = builder.get_disttag_srpm( + disttag=".%s" % get_rpm_release_from_mmd(build.mmd()), + module_build=build) component_build = models.ComponentBuild( module_id=build.id, package=artifact_name, @@ -328,6 +325,7 @@ def wait(config, session, msg): session.refresh(component_build) msgs = builder.recover_orphaned_artifact(component_build) if msgs: + log.info('Found an existing module-build-macros build') further_work += msgs # There was no existing artifact found, so lets submit the build instead else: @@ -342,6 +340,7 @@ def wait(config, session, msg): # first msgs = builder.recover_orphaned_artifact(component_build) if msgs: + log.info('Found an existing module-build-macros build') further_work += msgs else: task_id, state, reason, nvr = builder.build(artifact_name=artifact_name, source=srpm)