Page MenuHomePhabricator

Upgrade heritage to Strech
Closed, ResolvedPublic

Description

The heritage tool still runs on Trusty infrastructure

  • PHP API
  • Python bot

Related Objects

Mentioned In
T231152: Flake8 fails on labs-tools-heritage, complaining about py3 stuff
T231157: mysql-connect issues during ErfgoedBot run
T230769: Revive Erfgoedbot for WLM 2019
T216366: Upgrade misc JeanFred tools to Stretch
Mentioned Here
T231152: Flake8 fails on labs-tools-heritage, complaining about py3 stuff
rTHER0aac903a031e: Make cursor.execute format string
rTHER1b3db24e7f1b: Localisation updates from https://translatewiki.net.
rTHERcca097802093: Capture task id even if first line
rTHER88a754a69e6e: Rename methods for clarity in database_statistics
rTHERd93b940702f9: Localisation updates from https://translatewiki.net.
rTHERa571c0390119: Localisation updates from https://translatewiki.net.
rTHER1839191862a4: Localisation updates from https://translatewiki.net.
rTHER0591ddce39ee: Localisation updates from https://translatewiki.net.
rTHER672896143ac8: Localisation updates from https://translatewiki.net.
rTHERf1e82c5aaf4e: Localisation updates from https://translatewiki.net.
rTHER222780b7ae39: Localisation updates from https://translatewiki.net.
rTHER30813e8e0183: Localisation updates from https://translatewiki.net.
rTHERe1a242293f91: Localisation updates from https://translatewiki.net.
rTHER94ddd2d0accc: Localisation updates from https://translatewiki.net.
rTHERc6f7694e5726: Localisation updates from https://translatewiki.net.
rTHERe019c8add8ab: Localisation updates from https://translatewiki.net.
rTHER089ff8788dc2: Localisation updates from https://translatewiki.net.
rTHER3efdc7e11c28: Localisation updates from https://translatewiki.net.
rTHER033ff2757809: Localisation updates from https://translatewiki.net.
rTHER2e35e271ee5a: Localisation updates from https://translatewiki.net.
rTHERba68f7b1de07: Localisation updates from https://translatewiki.net.
rTHER975f530b7b12: Localisation updates from https://translatewiki.net.
rTHER58c8f34c08fe: Localisation updates from https://translatewiki.net.
rTHER8f30ee789c76: Set basepython to Python 2.7 in tox.ini
rTHERa39179fbbd3f: Add Wikidata-Item (as WD-Item) for at_de
rTHER00d50e03fee1: Base Python bot Dockerfile on debian:jessie instead of `ubuntu`
rTHER0c0108e4071d: Remove the `security` extra for `requests` and `cryptography`
rTHERafb11ea75917: Bump php-sqllint in composer.json
rTHERec66b4f02552: Remove redundant dev-dependencies from Pipfile
rTHER8d23f1e0ffc4: Extract more constants from bin script into defaults.sh
T216365: Upgrade wikiloves to Strech

Event Timeline

I looked into this some time ago.

This should have been as easy as re-running the provisioning scripts, but it will not, for the reasons described in https://lists.wikimedia.org/pipermail/cloud/2019-February/000535.html Until now, our provisioning worked 'by accident', by virtue of the bastion hosts using the same Python runtime as the grid hosts, which will not be the case anymore.

Seems like we need to do this manually >_>

Did T216365 − worked fairly smoothly (albeit completely manual >_>)

Mentioned in SAL (#wikimedia-cloud) [2019-03-22T21:40:43Z] <Lokal_Profil> Manually starting harvesting job to ensure migration (T216364) worked

PHP API seems to be working fine.

Started a manual harvest to see if that will work.... it didn't.

I'm getting ImportError: No module named datetime as part of the attempt to import pywikibot. Manually importing pywikibot in the venv works fine though. I did note that runing pip list in the venv doesn't show the same pywikibot version as the one it attempts to install through our requirements file. I believe it's the local pywikibot copy which is interfering.

Similarly updating the statistics seems to fail Call to undefined function mysql_connect() in /mnt/nfs/labstore-secondary-tools-project/heritage/heritage/api/includes/Database.php:150

I kept the old venv in venv_trusty for now if we need to compare anything. It can be nuked when no longer needed.

Note that I dropped the -l release=trusty flag from the jsub job as I assume this is the grid being shut down.

mysql_connect() seems deprecated but we are running 5.6 just as before so not sure what would have caused the change.

I hit the datetime thing in the Python for wikiloves as well. I did the following steps on heritage:

  • rm -rf .venv venv
  • webservice --backend=kubernetes python2 shell
  • ./bin/build-python.sh

Seems to have worked :)

Ah. Since I just renamed the old venv i missed the .venv.

Did this also make the statistics bit work?

Did this also make the statistics bit work?

Is there anything left to do in this task?

Change 532253 had a related patch set uploaded (by Jean-Frédéric; owner: Jean-Frédéric):
[labs/tools/heritage@master] Base Python bot Dockerfile on debian:jessie instead of ubuntu

https://gerrit.wikimedia.org/r/532253

Change 532253 merged by jenkins-bot:
[labs/tools/heritage@master] Base Python bot Dockerfile on debian:jessie instead of ubuntu

https://gerrit.wikimedia.org/r/532253

Did this also make the statistics bit work?

Is there anything left to do in this task?

No, agree this is done :)