Skip to content

updates-upstream-linux: check detected version before trying to use it

Dylan Aïssi requested to merge wip/daissi/linux-version into master

Just after adding apertis/v202*-security and -updates branches to be tracked by the dashboard, the returned version is "None" because the cache file is not yet updated. This "None" value makes the pipeline failing with:

Traceback (most recent call last):
  File "/builds/infrastructure/dashboard/./bin/packaging-updates-upstream-linux", line 209, in <module>
    results = compute_linux_updates(data)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builds/infrastructure/dashboard/./bin/packaging-updates-upstream-linux", line 134, in compute_linux_updates
    process = subprocess.run(
              ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', '-c', 'versionsort.suffix=-', 'ls-remote', '--exit-code', '--tags', '--refs', '--sort=version:refname', 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vNone*']' returned non-zero exit status 2.

To avoid failures, just skip this branch for this iteration.

https://phabricator.apertis.org/T9833

Signed-off-by: Dylan Aïssi dylan.aissi@collabora.com

Edited by Dylan Aïssi

Merge request reports