PR Service version instability with multiple build types
Hi Michael, all,
I have been exploring the PR Service concept for our builds, and am bumping into a problem.
I ported following patches from master onto our scarthgap-based branch:
39400c4a2b Michael Op.. 2024-10-11 bitbake: bitbake-prserver: use PRSERV_UPSTREAM as default setting de29354e84 Dan McGregor 2024-09-12 bitbake: prserv: increment 9 to 10 correctly fa9689923f Michael Op.. 2024-05-21 bitbake: prserv: add bitbake selftests ae0725577d Michael Op.. 2024-05-21 bitbake: prserv: import simplification 3be2201de5 Michael Op.. 2024-05-21 bitbake: prserv: store_value() improvements 0d6dd343de Michael Op.. 2024-05-21 bitbake: prserv: avoid possible race condition in database code 65757c9e20 Michael Op.. 2024-05-21 bitbake: prserv: enable database sharing 4cbce9cdf7 Michael Op.. 2024-05-21 bitbake: prserv: add "upstream" server support 5f99010e41 Michael Op.. 2024-05-21 bitbake: prserv: move code from __init__ to bitbake-prserv 48d38aef22 Michael Op.. 2024-05-21 bitbake: prserv: declare "max_package_pr" client hook
In local.conf, I enabled the PR service as follows:
PRSERV_HOST = "localhost:0"
PRAUTO = "1"
I observe that subsequent builds of different types for the same architecture, cause QA issues, for example:
ERROR: gcc-runtime-13.3.0-r0 do_packagedata_setscene: QA Issue: Package version for package gcc-runtime-src went backwards which would break package feeds (from 0:13.3.0-r0.1 to 0:13.3.0-r0.0) [version-going-backwards]
What happens is that the first build stores a PRAUTO version 0 in the database. The next build of a different type but for the same architecture, stores PRAUTO version 1 (some change in configuration will cause a different signature for this recipe). When you then repeat the first build, the above QA issue appears, because the signature for that first build still matches version 0.
I think this is a limitation of the data that is currently stored in the database. It contains:
- version (package name and version)
- architecture
- recipe signature
As a result, different subsequent builds for the same architecture, package name and version, but different signature, will cause version instability.
And even adding 'machine' in the database will not be enough, because you can still have different build types for the same machine.
One workaround for this problem will be to configure a different database for each build type. But this is not very convenient.
Have you considered this situation before?
What are your ideas about it?
Thanks,
Thomas