From 15523ac90eccb40193b5406c4114d17fffaf74f7 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Mon, 7 Aug 2017 15:43:53 +0200 Subject: [PATCH] Fix the bug when module build stuck in the 'build' state even with failed component builds. --- module_build_service/scheduler/handlers/repos.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module_build_service/scheduler/handlers/repos.py b/module_build_service/scheduler/handlers/repos.py index 7a6f7d88..56c8668b 100644 --- a/module_build_service/scheduler/handlers/repos.py +++ b/module_build_service/scheduler/handlers/repos.py @@ -89,13 +89,6 @@ def done(config, session, msg): tag_name=tag, components=[c.package for c in module_build.component_builds]) builder.buildroot_connect(groups) - # Ok, for the subset of builds that did complete successfully, check to - # see if they are in the buildroot. - artifacts = [component_build.nvr for component_build in good] - if not builder.buildroot_ready(artifacts): - log.info("Not all of %r are in the buildroot. Waiting." % artifacts) - return - # If we have reached here then we know the following things: # # - All components in this batch have finished (failed or succeeded) @@ -116,6 +109,13 @@ def done(config, session, msg): further_work = [] if has_unbuilt_components and not has_failed_components: + # Ok, for the subset of builds that did complete successfully, check to + # see if they are in the buildroot before starting new batch. + artifacts = [component_build.nvr for component_build in good] + if not builder.buildroot_ready(artifacts): + log.info("Not all of %r are in the buildroot. Waiting." % artifacts) + return + # Try to start next batch build, because there are still unbuilt # components in a module. further_work += start_next_batch_build(