From 604c850cfc8da411e8b49ed41d6a48dcd3f6df45 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Tue, 13 Apr 2021 13:21:43 -0400 Subject: [PATCH] sync_koji_build_tags: consider previous batches This works around a case where tagging messages are missed for a build with high reuse. In such a case, we can start out in the final batch, but have incorrect tag state for reused components from previous batches. --- module_build_service/scheduler/producer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module_build_service/scheduler/producer.py b/module_build_service/scheduler/producer.py index 3e80db6d..bdf1ae05 100644 --- a/module_build_service/scheduler/producer.py +++ b/module_build_service/scheduler/producer.py @@ -402,7 +402,7 @@ def sync_koji_build_tags(): models.ModuleBuild.state == models.BUILD_STATES["build"] ).all() for module_build in module_builds: - complete_components = module_build.current_batch(koji.BUILD_STATES["COMPLETE"]) + complete_components = module_build.up_to_current_batch(state=koji.BUILD_STATES["COMPLETE"]) for c in complete_components: # In case the component is tagged in the build tag and # also tagged in the final tag (or it is build_time_only