check_PO_master fails on Jenkins isobuilders
See e.g. https://jenkins.tails.boum.org/view/RM/job/check_PO_master/7055/console which reads:
11:44:16 + /var/lib/jenkins/tools/slaves/check_po
11:44:20 ERROR: po/ko.po:
11:44:20 i18nspector exited with 1 - stderr:
11:44:20 Traceback (most recent call last):
11:44:20 File "/usr/bin/i18nspector", line 85, in <module>
11:44:20 cli.main()
11:44:20 File "/usr/share/i18nspector/lib/cli.py", line 229, in main
11:44:20 check_all(files, options=options)
11:44:20 File "/usr/share/i18nspector/lib/cli.py", line 136, in check_all
11:44:20 check_file(path, options=options)
11:44:20 File "/usr/share/i18nspector/lib/cli.py", line 119, in check_file
11:44:20 return check_regular_file(path, options=options)
11:44:20 File "/usr/share/i18nspector/lib/cli.py", line 71, in check_regular_file
11:44:20 checker_instance.check()
11:44:20 File "/usr/share/i18nspector/lib/check/__init__.py", line 200, in check
11:44:20 self.check_translator(ctx)
11:44:20 File "/usr/share/i18nspector/lib/check/__init__.py", line 684, in check_translator
11:44:20 self.tag('invalid-last-translator', translator)
11:44:20 File "/usr/share/i18nspector/lib/cli.py", line 67, in tag
11:44:20 print(s)
11:44:20 UnicodeEncodeError: 'ascii' codec can't encode characters in position 38-40: ordinal not in range(128)
11:44:20
The test also fails when run manually, outside of Jenkins, logged in via SSH in an isobuilder on lizard.
OTOH this test passes fine:
- on my laptop
- when run on isotesters as part of the Tails test suite, e.g. https://jenkins.tails.boum.org/view/RM/job/test_Tails_ISO_stable/2812/cucumber-html-reports/report-feature_22_3931373336.html (there it exposes another failure but I fixed that one since)
- on GitLab CI: https://gitlab.tails.boum.org/tails/tails/-/pipelines?scope=all&ref=master
- on my local Jenkins
The only difference I can think of is the OS / i18nspector versions: on GitLab CI we run this test on Debian testing, Jenkins isotesters run Buster, my local Jenkins workers all run Buster, while the only systems that expose the problem (Jenkins isobuilders) run Stretch.
I've tried upgrading i18nspector to the version from Buster on isobuilders but that was not enough. So I suspect this could be related to the version of the Python interpreter or stdlib, because I simply can't think of other reasons.
There are 2 ways to properly fix this on the sysadmin side, but I don't know what's the timeline for them, and I'd rather not let this problem linger for months:
- We could upgrade the isobuilders to Buster or Bullseye (sysadmin#17743 (closed)), but it's unclear when sysadmins will do that.
- Drop the Jenkins test sysadmin#17776 (closed).
Shorter term, without no sysadmin work (or tiny amounts that I can do myself):
- We could run this test on isotesters (Buster) instead of isobuilders.
- We could drop this test and rely on GitLab CI, even though officially we can't trust its results.
- We can modify
po/ko.po
manually, but chances are we have to do this every time we pull updated PO files from Transifex, which is not ideal.
I'm fine with (1) and (2). Thoughts?