Skip to content

Fix the kpet version installed at the CI

Juanje Ojeda requested to merge juanjeojeda/kpet-db:fix_ci_kpet_version into master

The pipeline was giving false positives because the script run by the job diff wasn't failing when it should. In fact, the script has been failing for, at least, a month but giving no error at the pipeline and without test what it supposed to test.

It was failing because it wasn't using the correct kpet version, so the script couldn't do the actual tests. Here is an example (1 month old):

$ set -euxo pipefail
++ echo '$ scripts/kpet-diffs.sh kpet-db "${CI_MERGE_REQUEST_TARGET_BRANCH_SHA}"'
$ scripts/kpet-diffs.sh kpet-db "${CI_MERGE_REQUEST_TARGET_BRANCH_SHA}"
++ scripts/kpet-diffs.sh kpet-db ''
Invalid database:
  Invalid contents of /builds/cki-project/kpet-db/kpet-db/index.yaml:
    Unexpected member "case" encountered
HEAD is now at e360709 Remove buildroot dependency
Done

The script failed at the beginning, didn't do the checkings and exit without fail, so the job shows as passed.

I moved the Bash sets (set -euxo pipefail) to the script, so it would fail when necessary and so it would give more meaningful errors and info. Also, I made sure that the CI job uninstall any previous installed version of kpet and remove any cache, so the last revision from the main branch get installed.

For some reason, previously it was installing a 4 month old revision and it wasn't upgrading to the last one. Probably it has something to do with the fact that the package's version doesn't change, so pip gets confused.

Merge request reports