From 5cce3d5957afd757fb4b4cebacb6d7f72510d78d Mon Sep 17 00:00:00 2001 From: Hunor Csomortáni Date: Jan 02 2020 12:08:01 +0000 Subject: Create stats for module builds in 'init' state When watching builds, the dictionary to track module build progress was not populated with tracking information due to an early 'continue' statement. This caused watching builds fail when builds transitioned from 'init' to 'build' state between two watch cycles, with: Could not execute module_build: 'tasks_stats' This happened when building modules without any components and starting the watch as soon as the build was submitted. Treating 'init' as any other state solves this issue, as the 'build' branch in 'module_watch_build()' will find tracking information pre-populated. This is safe to do since 02affb4: we won't fail on an empty 'tasks' dictionary. Signed-off-by: Hunor Csomortáni Merges: https://pagure.io/rpkg/pull-request/478 --- diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py index 3271a03..7236563 100644 --- a/pyrpkg/__init__.py +++ b/pyrpkg/__init__.py @@ -3812,9 +3812,6 @@ class Commands(object): module_build['link'] = \ self.module_get_url(module_build['id']).split('?')[0] - if module_build['state_name'] == 'init': - continue - # tasks/rpms is a mapping from package name to package info, # e.g. {'pkg': {'nvr': ..., 'task_id': ..., 'state': ...}} # The injected task info will look like: