From 28d684331f8449033bb14a9e6e0285253704e5df Mon Sep 17 00:00:00 2001 From: Matt Prahl Date: Wed, 16 Nov 2016 15:23:51 -0500 Subject: [PATCH 1/7] Remove stale code from previous modulemd version --- .../scheduler/handlers/components.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/module_build_service/scheduler/handlers/components.py b/module_build_service/scheduler/handlers/components.py index ec721a91..3b4f1948 100644 --- a/module_build_service/scheduler/handlers/components.py +++ b/module_build_service/scheduler/handlers/components.py @@ -87,24 +87,6 @@ def _finalize(config, session, msg, state): builder.buildroot_add_artifacts([nvr,], install=install) session.commit() - # Find all of the sibling builds of this particular build. - current_batch = parent.current_batch() - - # If there are no components, transition module build state to 'done' - if not current_batch: - log.info("Batch is empty. Moving module state to DONE.") - parent.transition(config, module.BUILD_STATES['done']) - session.commit() - return - - # Otherwise, check to see if all failed. If so, then we cannot continue on - # to a next batch. This module build is doomed. - if all([c.state != koji.BUILD_STATES['COMPLETE'] for c in current_batch]): - # They didn't all succeed.. so mark this module build as a failure. - parent.transition(config, models.BUILD_STATES['failed'], state_reason) - session.commit() - return - def complete(config, session, msg): return _finalize(config, session, msg, state=koji.BUILD_STATES['COMPLETE']) From 62654f871fed7d595874b5c61a175699f275af59 Mon Sep 17 00:00:00 2001 From: Matt Prahl Date: Wed, 16 Nov 2016 09:24:08 -0500 Subject: [PATCH 2/7] Fixes bug where the build tag was not returned --- module_build_service/scheduler/handlers/modules.py | 5 ++++- tests/test_scheduler/test_module_wait.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/module_build_service/scheduler/handlers/modules.py b/module_build_service/scheduler/handlers/modules.py index 2875dd51..c4e1499d 100644 --- a/module_build_service/scheduler/handlers/modules.py +++ b/module_build_service/scheduler/handlers/modules.py @@ -160,4 +160,7 @@ def wait(config, session, msg): # If this build already exists and is done, then fake the repo change event # back to the scheduler if state == koji.BUILD_STATES['COMPLETE']: - return [module_build_service.messaging.KojiRepoChange('fake msg', build.koji_tag)] + # TODO: builder.module_build_tag only works for Koji, figure out if + # other backends need this implemented (e.g. COPR) + return [module_build_service.messaging.KojiRepoChange( + 'fake msg', builder.module_build_tag['name'])] diff --git a/tests/test_scheduler/test_module_wait.py b/tests/test_scheduler/test_module_wait.py index da3f0bd1..c07b1f2f 100644 --- a/tests/test_scheduler/test_module_wait.py +++ b/tests/test_scheduler/test_module_wait.py @@ -40,6 +40,7 @@ class TestModuleWait(unittest.TestCase): builder = mock.Mock() builder.get_disttag_srpm.return_value = 'some srpm disttag' builder.build.return_value = 1234, 1, "", None + builder.module_build_tag = {'name': 'some-tag-build'} KojiModuleBuilder.return_value = builder mocked_module_build = mock.Mock() mocked_module_build.json.return_value = { From 02c245961bda60c37a26eb5df87958765cbdeddf Mon Sep 17 00:00:00 2001 From: Matt Prahl Date: Tue, 15 Nov 2016 10:31:03 -0500 Subject: [PATCH 3/7] Start fedmsg-relay on boot in Vagrant --- Vagrantfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Vagrantfile b/Vagrantfile index 2818042a..caa6c9e8 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -27,6 +27,7 @@ $script = <