fedora-infra / koschei

Continuous integration for Fedora packages
GNU General Public License v2.0
37 stars 15 forks source link

State sometimes does not match state of last build #343

Open ellert opened 2 years ago

ellert commented 2 years ago

The state reported for a package in a release is sometimes different from the state reported for the last build. E.g.

Here the result of the last build is reported as a failed, but the state is reported as ok: koschei-root-rawhide

Here the result of the last build is reported as ok, but the state is reported as failing. koschei-roort-epel7

mizdebsk commented 2 years ago

Confirmed, there is inconsistency in database. Package state should always be equal to state of the latest build.

For performance package state is stored in database as denormalized field, which may outdated as the following query shows:

koschei=> select count(*) from package p join build b on b.id=p.last_build_id where p.last_complete_build_state<>b.state;
 count 
-------
    25
(1 row)

The count is changing quite often (several times per minute). This needs further investigation.