Page MenuHomePhabricator

Class undefined: \Wikibase\Lib\JsonUnitStorage
Closed, ResolvedPublic

Description

Spotted in production immediately upon rolling out wmf.10:

Fatal error: Class undefined: \Wikibase\Lib\JsonUnitStorage in /srv/mediawiki/php-1.30.0-wmf.10/includes/libs/ObjectFactory.php on line 143

Definitely blocks train.

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterRemove obsolete backwards compatibility code for "unitStorage" config
mediawiki/extensions/Wikibase : masterAllow "unitStorage" configuration without referencing class names
operations/mediawiki-config : masterSimplify Wikibase "unitStorage" configuration
operations/mediawiki-config : masterCleanup old BC config for JsonUnitStorage
operations/mediawiki-config : masterwikidatawiki back to wmf.10
operations/mediawiki-config : masterUse correct class name for JsonUnitStorage
operations/mediawiki-config : masterwikidatawiki back to wmf.9 for now

Event Timeline

demon created this task.Jul 19 2017, 9:04 PM
Restricted Application added subscribers: Liuxinyu970226, Jay8g, TerraCodes, Aklapper. · View Herald TranscriptJul 19 2017, 9:04 PM

Change 366467 had a related patch set uploaded (by Chad; owner: Chad):
[operations/mediawiki-config@master] wikidatawiki back to wmf.9 for now

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

Change 366467 merged by jenkins-bot:
[operations/mediawiki-config@master] wikidatawiki back to wmf.9 for now

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

Hmm should be Wikibase\Lib\Units\JsonUnitStorage. Looks like config should be fixed?

Change 366480 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[operations/mediawiki-config@master] Use correct class name for JsonUnitStorage

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

Smalyshev added a comment.EditedJul 19 2017, 10:51 PM

wmf.9 had this class name as Wikibase\Lib\JsonUnitStorage, in wmf.10 it's Wikibase\Lib\Units\JsonUnitStorage. Not sure what is the recommended way to handle such things? Should it use ::class?

Change 366480 merged by jenkins-bot:
[operations/mediawiki-config@master] Use correct class name for JsonUnitStorage

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

Mentioned in SAL (#wikimedia-operations) [2017-07-19T23:29:02Z] <dereckson@tin> Synchronized wmf-config/Wikibase-production.php: Use correct class name for JsonUnitStorage (T171107) (duration: 00m 48s)

Smalyshev closed this task as Resolved.Jul 19 2017, 11:32 PM
Smalyshev claimed this task.

Change 366488 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[operations/mediawiki-config@master] Cleanup old BC config for JsonUnitStorage

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

Change 366532 had a related patch set uploaded (by Thiemo Mättig (WMDE); owner: Thiemo Mättig (WMDE)):
[mediawiki/extensions/Wikibase@master] Allow "unitStorage" configuration without referencing class names

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

Change 366533 had a related patch set uploaded (by Thiemo Mättig (WMDE); owner: Thiemo Mättig (WMDE)):
[operations/mediawiki-config@master] Simplify Wikibase "unitStorage" configuration

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

Change 366534 had a related patch set uploaded (by Thiemo Mättig (WMDE); owner: Thiemo Mättig (WMDE)):
[mediawiki/extensions/Wikibase@master] Remove obsolete backwards compatibility code for "unitStorage" config

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

demon added a comment.Jul 20 2017, 4:01 PM

Thanks for all the work on this yesterday folks. We're resolved, so I'm guessing ok to move forward on wmf.10 for wikidatawiki?

@demon Yes, I believe it is fine now. I'll keep an eye on the logs just in case.

Change 366589 had a related patch set uploaded (by Chad; owner: Chad):
[operations/mediawiki-config@master] wikidatawiki back to wmf.10

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

Change 366589 merged by jenkins-bot:
[operations/mediawiki-config@master] wikidatawiki back to wmf.10

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

Change 366488 merged by jenkins-bot:
[operations/mediawiki-config@master] Cleanup old BC config for JsonUnitStorage

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

Restricted Application added a subscriber: PokestarFan. · View Herald TranscriptJul 31 2017, 11:05 PM

Mentioned in SAL (#wikimedia-operations) [2017-07-31T23:11:10Z] <thcipriani@tin> Synchronized wmf-config/Wikibase-production.php: SWAT: [[gerrit:366488|Cleanup old BC config for JsonUnitStorage]] T171107 (duration: 00m 42s)

Change 366533 abandoned by Thiemo Mättig (WMDE):
Simplify Wikibase "unitStorage" configuration

Reason:
I need to redo the patch this depends-on, and will upload a new config patch when this is done.

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

Change 366532 abandoned by Thiemo Kreuz (WMDE):
Allow "unitStorage" configuration without referencing class names

Reason:
It makes me sad to see experienced developers not realizing the problem with hard-coded snippets of executable code in configuration strings (a full qualified class name effectively is code). This is guaranteed to break (and already did several times) any time a class is refactored or moved to an other namespace (e.g. to make a codebase PSR-4 compatible). But this is not going to be my problem any more.

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

Change 366534 abandoned by Thiemo Kreuz (WMDE):
Remove obsolete backwards compatibility code for "unitStorage" config

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

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM