Page MenuHomePhabricator

Update SpecialNewProperty and SpecialNewItem to use new store conflict detection
Closed, ResolvedPublic

Description

SpecialNewProperty and SpecialNewItem directly entities from form data and do their own validation inside validateFormData.

New store fingure print uniqueness validation was introduced as a validator executed inside ChangeOpFingerprintResult, so since the aforementioned two specials do not use ChangeOp to create the entities (unlike the other specials such as SpecialSetAliases .. etc), they will have to be updated to use the new store conflict detection directly as well.

Event Timeline

Change 562782 had a related patch set uploaded (by Sarhan; owner: Sarhan):
[mediawiki/extensions/Wikibase@master] Update new enitty specials to check fingerprint uniqueneness in new store

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

I drafted a patch for this, but won't have enough time to clean it up .. it works fine now, but the code is not the prettiest. Specifically, it might require some clean-up around where TermCollisionDetector instances come from, as for these two special pages we are getting them directly from WikibaseRepo (where it is determined whether we are using new store or not) but inside TermsValidatorFactory it is done using another layer of indirection (with ByIdFingerprintUniquenessValidator) and so on.. but probably it is better to do such clean up when migration is done and temporary stuff are removed.

Change 562782 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Update new enitty specials to check fingerprint uniqueneness in new store

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

Just verified this locally (probably shouldn't wait on this board until we finish migration etc...)