pkgset: Compare future events correctly
It is possible to try to re-run a compose with old event. When trying to reuse pkgset data, we must use set the bounds not based on current/reused event, but actually check which was first. JIRA: CWFHEALTH-495 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
7fe32ae758
commit
bf28e8d50c
@ -745,7 +745,8 @@ class KojiPackageSet(PackageSetBase):
|
||||
changed = self.koji_proxy.queryHistory(
|
||||
tables=["tag_listing", "tag_inheritance"],
|
||||
tag=tag,
|
||||
afterEvent=old_koji_event,
|
||||
afterEvent=min(koji_event, old_koji_event),
|
||||
beforeEvent=max(koji_event, old_koji_event) + 1,
|
||||
)
|
||||
if changed["tag_listing"]:
|
||||
self.log_debug("Builds under tag %s changed. Can't reuse." % tag)
|
||||
@ -760,8 +761,8 @@ class KojiPackageSet(PackageSetBase):
|
||||
changed = self.koji_proxy.queryHistory(
|
||||
tables=["tag_listing", "tag_inheritance"],
|
||||
tag=t["name"],
|
||||
afterEvent=old_koji_event,
|
||||
beforeEvent=koji_event + 1,
|
||||
afterEvent=min(koji_event, old_koji_event),
|
||||
beforeEvent=max(koji_event, old_koji_event) + 1,
|
||||
)
|
||||
if changed["tag_listing"]:
|
||||
self.log_debug(
|
||||
|
Loading…
Reference in New Issue
Block a user