Page MenuHomePhabricator

Undeploy patch to use old PHP serialization in PHP 7.4
Closed, ResolvedPublic

Description

As part of the production migration to PHP 7.4 (sharing some caches with PHP 7.2), we patched our PHP 7.4 to emit 7.2-compatible serialization.

I think I can patch PHP 7.4 so that its serialize() is backwards compatible. Just like so, effectively a partial revert of nikic's implementation patch. A patched PHP binary would be able to read the new format, but would not write it. So we would migrate fully to the patched PHP 7.4, then when we are sure there will be no need to revert back to PHP 7.2, we would revert the patch.

This worked, but broke some tests that expected PHP 7.4 to emit the new serialization.

For information: after I have deployed our patched php7.4 to CI, a Wikibase test started failing. The test asserts against serialize() output based on version_compare( phpversion(), '7.4', '>=' ) ) but since our 7.4 yields the previous serialization format the assertion fails. We talked about it and will mark the test skipped until we switch to the un patched 7.4. T243590#8207874

Once the migration to PHP 7.4 in production is finished (T271736 or T318894), we should remove this patch again, and use the new serialization.

Related Objects

StatusSubtypeAssignedTask
ResolvedJdforrester-WMF
Resolved toan
ResolvedLucas_Werkmeister_WMDE
ResolvedJoe
ResolvedJoe
ResolvedDzahn
Resolvedhashar
ResolvedJdforrester-WMF
ResolvedLadsgroup
ResolvedMoritzMuehlenhoff
Resolvedjijiki
ResolvedMoritzMuehlenhoff
ResolvedTrizek-WMF
ResolvedDzahn
Resolved Gilles
ResolvedDzahn
ResolvedRequestPapaul
Resolvedjijiki
DeclinedNone
ResolvedDzahn
ResolvedDzahn
ResolvedPapaul
Resolved Cmjohnson
ResolvedRequest Cmjohnson
ResolvedRequestPapaul
ResolvedAndrew
ResolvedArielGlenn
ResolvedDzahn
ResolvedLegoktm
ResolvedPapaul
ResolvedDzahn
Declined Gilles
ResolvedVolans
ResolvedDzahn
ResolvedLegoktm
ResolvedPleaseStand
ResolvedJoe
Resolvedtstarling
ResolvedArielGlenn
ResolvedJoe
Resolvedtstarling
ResolvedJdforrester-WMF
ResolvedJdforrester-WMF
ResolvedLegoktm
ResolvedJdforrester-WMF
ResolvedDaimona
ResolvedDaimona
ResolvedJdforrester-WMF
ResolvedJoe
ResolvedJMeybohm
ResolvedJoe
ResolvedJoe
ResolvedJoe
ResolvedJoe
ResolvedKrinkle
ResolvedJoe
ResolvedClement_Goubert
ResolvedClement_Goubert
ResolvedClement_Goubert
ResolvedMainframe98
ResolvedJoe

Event Timeline

Just filing this task for tracking, since I couldn’t find an existing task for it. Not sure which tags / projects it should have, to be honest.

Adding Continuous-Integration-Infrastructure (or should it be Continuous-Integration-Config?) since the patched PHP is also used in CI. (I assume that doesn’t need a separate task, but feel free to create one if I’m wrong.)

Joe triaged this task as High priority.Oct 3 2022, 8:29 AM
Joe moved this task from Incoming 🐫 to API Gateway 🥌 on the serviceops board.
Joe moved this task from API Gateway 🥌 to Doing 😎 on the serviceops board.

Mentioned in SAL (#wikimedia-operations) [2022-10-06T08:59:23Z] <_joe_> uploaded new php 7.4 packages T318918

Mentioned in SAL (#wikimedia-operations) [2022-10-06T09:21:34Z] <_joe_> installed the upgraded php package to mw1414, T318918

Mentioned in SAL (#wikimedia-operations) [2022-10-06T10:51:39Z] <_joe_> installing the upgraded php package everywhere, T318918

As far as I can tell, this is done in production (thanks Joe!), but not yet in CI – a change I just uploaded for T316923 is still failing in CI due to the different serialization (console).

Change 839517 had a related patch set uploaded (by Jforrester; author: Jforrester):

[integration/config@master] dockerfiles: [php74] Re-build to pick up newer version of Wikimedia's PHP

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

Change 839517 merged by jenkins-bot:

[integration/config@master] dockerfiles: [php74] Re-build to pick up newer version of Wikimedia's PHP

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

Mentioned in SAL (#wikimedia-releng) [2022-10-06T13:00:53Z] <James_F> Docker: Building and publishing php74:0.3.2 and cascade for T318918

Change 839520 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] jjb: update jobs for newer Wikimedia's php 7.4

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

Change 839520 merged by jenkins-bot:

[integration/config@master] jjb: update jobs for newer Wikimedia's php 7.4

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

James has made the necessary CI updates and I have deployed them.

Joe added a subscriber: LucasWerkmeister.

Sorry @LucasWerkmeister I assumed this task was about updating production. Re-resolving then :)

The change for T316923 is passing in CI now (currently going through test-and-submit), so I think this is indeed done. Thanks a lot everyone! \o/