Page MenuHomePhabricator

Upgrade ZppixBot docker image to python 3.7
Closed, ResolvedPublic3 Estimated Story Points

Description

Python 3.5.x is EOL in September 2020.

Toolforge currently have a 3.7.x image available that we can switch to, we should do this giving us ~3 years more support.

We should also fix CI to only support python 3.7+

Details

Due Date
Aug 31 2020, 10:59 PM

Event Timeline

RhinosF1 triaged this task as High priority.Jun 2 2020, 1:39 PM
RhinosF1 created this task.

Switching the docker image failed:

tools.zppixbot-test@tools-sgebastion-07:~/zppixbottest/bin$ kubectl logs sopeltest.bot-7b7cc7c58-v6vgk
Traceback (most recent call last):
  File "/data/project/zppixbot-test/zppixbottest/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
Traceback (most recent call last):
  File "/data/project/zppixbot-test/zppixbottest/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
Traceback (most recent call last):
  File "/data/project/zppixbot-test/zppixbottest/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
Traceback (most recent call last):
  File "/data/project/zppixbot-test/zppixbottest/bin/pip3", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
Traceback (most recent call last):
  File "/data/project/zppixbot-test/zppixbottest/bin/sopel", line 5, in <module>
    from sopel.cli.run import main
ModuleNotFoundError: No module named 'sopel'
RhinosF1 added a project: Documentation.

I will do the main instance later today.

We should document this

RhinosF1 moved this task from To Triage / Backlog to 2020 June - September on the ZppixBot board.
RhinosF1 moved this task from Radar to Deployment on the User-RhinosF1 board.
RhinosF1 set the point value for this task to 2.

For whoever does the docs:
/me looks at @MacFan4000
Steps:

  • webservice python[version] shell
  • python[version] -m venv [new venv name]
  • python —version to check update
  • Update the active shell file (currently starter-new.sh) to point to the new venv (check ls -lsa in [new venv name]/bin to see the name for the correct python/pip file)
  • switch the yaml file (normally sopelbot.yaml) to the new image from docker registery
  • kubectl delete deployment [name for the bot] & kubectl create --validate=true -f /data/project/[instance]/k8s/[yaml file]
  • Then if everything goes well, delete the old venv

Mentioned in SAL (#wikimedia-cloud) [2020-06-03T17:58:37Z] <RhinosF1> rolling back to python 3.5 with examknow due to T254348 cc T254246

Mentioned in SAL (#wikimedia-cloud) [2020-06-03T18:15:25Z] <RhinosF1> python is now 3.5 due to T254348 cc T254246

RhinosF1 changed the task status from Open to Stalled.Jun 5 2020, 1:15 PM

I will be attempting to unblock this tonight.

If my plan works, we should be able to move forward on Sunday (to allow time to test things).

RhinosF1 changed the point value for this task from 2 to 3.Jun 6 2020, 12:43 PM

This should be unblocked by the end of today.

We'll be attempting to roll forward on Monday to -test + Wednesday to core.

I unstall this when I resolve the subtask tonight.

Mentioned in SAL (#wikimedia-cloud) [2020-06-08T21:22:30Z] <RhinosF1> deleted sopel deployment to switch to py3.7 START -- T254246

Mentioned in SAL (#wikimedia-cloud) [2020-06-08T21:30:03Z] <RhinosF1> recreate deployment in py3.7 for T254246 END

Logs clear, nothing seems to have exploded.

I've ran multiple commands and checked the logs. So far, so good

22:32:26 <ZppixBot-test> RhinosF1: Sopel v7.0.4 (Python 3.7.3)

If this stays clear, I will deploy in ~36 hours to core.

Mentioned in SAL (#wikimedia-cloud) [2020-06-09T09:41:45Z] <RhinosF1> delete deployment to begin rolling back T254246 due to T254348

Mentioned in SAL (#wikimedia-cloud) [2020-06-09T09:47:14Z] <RhinosF1> rolled back sopelbot to python 3.5 -- END due to T254348 (cc T254246)

RhinosF1 changed the task status from Open to Stalled.Jun 9 2020, 9:50 AM

Blocking

Rollback completed in ~8 mins for the record.

RhinosF1 changed the task status from Stalled to Open.Jun 19 2020, 2:27 PM

We discovered a likely cause for the subtask so I'm going to go for this to -test on Sunday night with some cautious testing & monitoring.

Mentioned in SAL (#wikimedia-cloud) [2020-06-24T15:46:23Z] <RhinosF1> updating test to py37 -- T254246

Mentioned in SAL (#wikimedia-cloud) [2020-06-26T09:33:49Z] <RhinosF1> update python for bot (not cron) to py37 -- T254246

Added wheel to the starter file because it was missing and restarted but technically and finally update done.