As part of https://github.com/AlmaLinux/build-system/issues/355, I fixed inaccurate references in production OVAL to add new OVAL tests when required. However, during the old OVAL data migration, liboval's data generation is taking into account already created object/state/test ids in prod and in current data generation, but not tracking already added ones during the migration process, which led to the follwing example of id collision:
<criterion test_ref="oval:org.almalinux.alsa:tst:20233002003" comment="bind-chroot is earlier than 32:9.11.36-8.el8"/>
<criterion test_ref="oval:org.almalinux.alsa:tst:20233002003" comment="bind-export-libs is earlier than 32:9.11.36-8.el8"/>
The test itself is:
<red-def:rpminfo_test check="at least one" comment="bind-chroot is earlier than 32:9.11.36-8.el8" id="oval:org.almalinux.alsa:tst:20233002003" version="636">
<red-def:object object_ref="oval:org.almalinux.alsa:obj:20191145002"/>
<red-def:state state_ref="oval:org.almalinux.alsa:ste:20233002001"/>
</red-def:rpminfo_test>
We need to update liboval's data generator to take into account already existing tests (in prod, in current data generation AND in the migration process) when generating new ref ids to avoid such collisions.
We also need to update the migration script, and probably, the current code in web_server that makes use of liboval's data generator.
As part of https://github.com/AlmaLinux/build-system/issues/355, I fixed inaccurate references in production OVAL to add new OVAL tests when required. However, during the old OVAL data migration, liboval's data generation is taking into account already created object/state/test ids in prod and in current data generation, but not tracking already added ones during the migration process, which led to the follwing example of id collision:
The test itself is:
Whose object ref is bind-chroot's one:
We need to update liboval's data generator to take into account already existing tests (in prod, in current data generation AND in the migration process) when generating new ref ids to avoid such collisions. We also need to update the migration script, and probably, the current code in web_server that makes use of liboval's data generator.