Page MenuHomePhabricator

Removed deprecated "legacy" serialization type from RESTBagOStuff
Closed, ResolvedPublic2 Estimated Story Points

Description

T233963: Add serialization options to RESTBagOStuff added a serialization type parameter to RESTBagOStuff with possible values:

  • legacy
  • PHP
  • JSON

The purpose of the "legacy" serialization type was to give any RESTBagOStuff users the opportunity to migrate to one of the other types. This was done in an abundance of caution, as there were no known users, but it is possible that third party private wikis were using RESTBagOStuff.

The "legacy" type was marked as deprecated in 1.34, with a comment that it would be removed in 1.35.

After the 1.34 release, remove the "legacy" serialization type, so that it will not be present in 1.35.

Event Timeline

BPirkle changed the task status from Open to Stalled.Oct 7 2019, 4:58 AM
BPirkle triaged this task as Low priority.
BPirkle set the point value for this task to 2.

Marking this as "Stalled" because it cannot be done until after the 1.34 release.

DannyS712 changed the task status from Stalled to Open.Mar 11 2020, 10:08 AM
DannyS712 subscribed.

Marking this as "Stalled" because it cannot be done until after the 1.34 release.

1.34 was released, no longer stalled

Anomie subscribed.

@BPirkle What's the status here? Is it just code removal, or is WMF production still using "legacy"?

WMF Production is explicitly specifying the "PHP" serialization type in $wgObjectCaches['kask-session'] (with an hmac key stored in $wmgSessionStoreHMACKey). The "legacy" type can be removed.

Unless I'm missing something, these are the things that need to be done:

  1. change block comment at https://gerrit.wikimedia.org/g/mediawiki/core/+/35eea56a957d84f6f7dc9c106af85ac0ccd7f194/includes/libs/objectcache/RESTBagOStuff.php#78 to not mention "legacy", to remove the deprecation notice, and to list only "PHP" and "JSON" as allowed values.
  2. change block comment at https://gerrit.wikimedia.org/g/mediawiki/core/+/35eea56a957d84f6f7dc9c106af85ac0ccd7f194/includes/libs/objectcache/RESTBagOStuff.php#87 to not mention "legacy"
  3. change default at https://gerrit.wikimedia.org/g/mediawiki/core/+/35eea56a957d84f6f7dc9c106af85ac0ccd7f194/includes/libs/objectcache/RESTBagOStuff.php#125 to be whatever we prefer. We'd said in T233963: Add serialization options to RESTBagOStuff that we'd default to PHP. But as production is explicitly specifying the serialization type, I don't have strong feelings about which default we choose.
  4. change function decodeBody at https://gerrit.wikimedia.org/g/mediawiki/core/+/35eea56a957d84f6f7dc9c106af85ac0ccd7f194/includes/libs/objectcache/RESTBagOStuff.php#232 to remove mentions of legacy.
  5. ditto for function encodeBody at https://gerrit.wikimedia.org/g/mediawiki/core/+/35eea56a957d84f6f7dc9c106af85ac0ccd7f194/includes/libs/objectcache/RESTBagOStuff.php#272
  6. modify the two data provider functions in RESTBagOStuffTest to not test the "legacy" serialization type.

This needs a code base project tag so someone can find this task when searching, hence adding MediaWiki-libs-BagOStuff

Change 612362 had a related patch set uploaded (by BPirkle; owner: BPirkle):
[mediawiki/core@master] Remove deprecated "legacy" serialization type from RESTBagOStuff

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

Change 612362 merged by jenkins-bot:
[mediawiki/core@master] Remove deprecated "legacy" serialization type from RESTBagOStuff

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