Page MenuHomePhabricator

Python3 scap breaks mediawiki
Closed, ResolvedPublic

Description

Recently reported on beta:

In T285118#7170467, @Majavah wrote:

my best guess is caused by a scap upgrade that's on beta but not on production.

We've been porting Scap to Python3 latetly, and this _might_ be Unicode string confusion problem somewhere. I don't know that it is, though, nor can I see where it might be.

If this guess is correct then we need to revert Scap in beta and/or fix ASAP. Right now we're bypassing even more QA steps than we normally do for this weeks' deployment T281152.

Event Timeline

Krinkle updated the task description. (Show Details)

Looks like most of the investigation so far is T285125#7163052 and following comments.

thcipriani renamed this task from Localisation cache is broken in beta to Python3 scap breaks localisation cache.Jun 28 2021, 9:10 PM
thcipriani triaged this task as Medium priority.
thcipriani updated the task description. (Show Details)

OK, it looks like the issue might be that prod machines generally seem to have Python 3.7, but the Beta Cluster machines have Python 3.5. Joy.

OK, it looks like the issue might be that prod machines generally seem to have Python 3.7, but the Beta Cluster machines have Python 3.5. Joy.

Which machines? Deployment hosts (blocked on T277078) and the maintenance script runner are on Stretch/Python 3.5, but app servers (including mw11 in T285125#7180648) have 3.7 (as they're on Buster)

In T285345#7183925, @Majavah wrote:

OK, it looks like the issue might be that prod machines generally seem to have Python 3.7, but the Beta Cluster machines have Python 3.5. Joy.

Which machines? Deployment hosts (blocked on T277078) and the maintenance script runner are on Stretch/Python 3.5, but app servers (including mw11 in T285125#7180648) have 3.7 (as they're on Buster)

The deployment hosts are the ones that count for scap, sadly (well, both do, but…).

thcipriani renamed this task from Python3 scap breaks localisation cache to Python3 scap breaks mediawiki.Jun 29 2021, 5:20 PM

Change 702233 had a related patch set uploaded (by Ahmon Dancy; author: Ahmon Dancy):

[mediawiki/tools/scap@master] cdblib.py: Python 3 fixes

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

Scap has been reverted on all beta notes and CDB files have been regenerated and redeployed.

Change 702233 merged by jenkins-bot:

[mediawiki/tools/scap@master] cdblib.py: Python 3 fixes

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

@dduvall that is an excellent patch and I definitely love the round trip write/read test :-]

Jdforrester-WMF reassigned this task from dduvall to dancy.
Jdforrester-WMF added a subscriber: dduvall.

@dduvall that is an excellent patch and I definitely love the round trip write/read test :-]

@dancy patched the implementation, I wrote the test. Extreeeeeeeme! :)