Skip to content

package.loader: Split the warning message into multiple chunks

Otherwise, when the list is too large, it cascades to a logging error...

Just to raise awareness, I notice this when extracting the issues on staging (Sentry most probably references the issue, my network is too flaky to go and browse there).

Please, don't hesitate to take this over and improve over it or completely discard it with something better ;)

Error excerpt from worker0.internal.staging.swh.network journalctl -xef -u swh-worker@loader_nixguix:

Aug 11 22:29:51 worker0 python3[3081241]:   File "/usr/lib/python3.7/logging/__init__.py", line 905, in handle
Aug 11 22:29:51 worker0 python3[3081241]:     self.emit(record)                                                                                                                                                                                Aug 11 22:29:51 worker0 python3[3081241]:   File "/usr/lib/python3/dist-packages/swh/core/logger.py", line 117, in emit
Aug 11 22:29:51 worker0 python3[3081241]:     self.handleError(record)
Aug 11 22:29:51 worker0 python3[3081241]: Message: '%d failed branches: %s'
Aug 11 22:29:51 worker0 python3[3081241]: Arguments: (1776, ['https://www.abisource.com/downloads/abiword/3.0.4/source/abiword-3.0.4.tar.gz', 'http://www.mushware.com/files/adanaxisgpl-1.2.5.tar.gz', 'http://ftp.belnet.be/ftp.gnome.org/sou
rces/adwaita-icon-theme/3.34/adwaita-icon-theme-3.34.3.tar.xz', 'ftp://ftp.fau.de/gentoo/distfiles/agg-2.5.tar.gz', 'http://ftp.belnet.be/ftp.gnome.org/sources/aisleriot/3.22/aisleriot-3.22.9.tar.xz', 'ftp://ftp.alsa-project.org/pub/lib/al
sa-lib-1.2.2.tar.bz2', 'ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-1.2.2.tar.bz2', 'ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.2.2.tar.bz2', 'http://ftp.belnet.be/ftp.gnome.org/sources/amtk/5.0/amtk-5.0.2.tar.xz', 'http://w

Test Plan

tox


Migrated from D3764 (view on Phabricator)

Merge request reports