Simple schema version consistency check in CI
Summary
Since we moved to a dedicated repository for the catalogue with a submodule reference in main, we can inadvertently insert a schema change in main. This happened last week and went unnoticed as the CI is taking the last schema version from the source tree: the only visible glitch was a nightly dbupgrade pipeline failing.
What is the expected correct behaviour?
We should fail this one as early as possible: make sure that the first CI step fails if the submodule catalogue version is not the one expected in the branch.
Simple fix for this that we discussed in 230526 dev meeting:
- put the expected schema version string in cmake file
- if the submodule schema version is different from the one in cmake, immediately fails the CI job with a human readable error:
- cmake expects version 12.0, but submodule provides version 13.0, please fix
This can be implemented in a simple script that runs in the very beginning of the CI pipeline: the idea is to notify the developer who introduced this inconsistency ASAP so that he can fix it and it does not go to main nor stay in main until someone luckily spots a failing nightly.
This catalogue version string can be the reference version for CTA especially in CI scripts (as a double check).