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.
This commit is contained in:
Mike McLean
2021-04-13 13:21:43 -04:00
parent bed3ecbc2c
commit 604c850cfc

View File

@@ -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