Page MenuHomePhabricator

Remove "old federation" methods from EntityId
Open, Needs TriagePublic

Description

Although they are used in a few places, these methods likely no longer necessary. This includes

  • EntityId:
    • EntityId::getLocalPart
    • EntityId::getRepositoryName
  • SerializableEntityId:
    • SerializableEntityId::splitSerialization
    • SerializableEntityId::joinSerialization
    • SerializableEntityId::isForeign
  • corresponding methods in concrete entity ID classes: ItemId, PropertyId, LexemeId/FormId/SenseId, MediaInfoId

Acceptance Criteria: 🏕️🌟(September 2021):

  • all calls to those methods are removed
  • those methods are gone, as well as all private/protected methods that become unused with this

Details

SubjectRepoBranchLines +/-
mediawiki/extensions/WikibaseLexememaster+0 -17
mediawiki/extensions/WikibaseLexememaster+2 -0
mediawiki/extensions/Wikibasemaster+0 -162
mediawiki/extensions/WikibaseMediaInfomaster+2 -0
mediawiki/extensions/Wikibasemaster+44 -0
mediawiki/extensions/Wikibasemaster+0 -95
mediawiki/extensions/WikibaseMediaInfomaster+0 -6
mediawiki/extensions/Wikibasemaster+1 -1
mediawiki/extensions/WikibaseMediaInfomaster+6 -3
mediawiki/extensions/WikibaseLexememaster+0 -15
mediawiki/extensions/WikibaseLexememaster+13 -6
mediawiki/extensions/WikibaseLexememaster+4 -4
mediawiki/extensions/Wikibasemaster+0 -68
mediawiki/extensions/Wikibasemaster+0 -44
mediawiki/extensions/Wikibasemaster+14 -14
mediawiki/extensions/WikibaseLexememaster+4 -9
mediawiki/extensions/Wikibasemaster+12 -36
mediawiki/extensions/WikibaseLexememaster+1 -1
mediawiki/extensions/WikibaseLexememaster+1 -1
mediawiki/extensions/Wikibasemaster+19 -10
mediawiki/extensions/Wikibasemaster+0 -61
mediawiki/extensions/WikibaseLexememaster+1 -4
mediawiki/extensions/Wikibasemaster+2 -8
mediawiki/extensions/WikibaseMediaInfomaster+3 -15
mediawiki/extensions/WikibaseMediaInfomaster+0 -5
mediawiki/extensions/Wikibasemaster+0 -15
mediawiki/extensions/WikibaseLexememaster+5 -7
mediawiki/extensions/Wikibasemaster+40 -35
mediawiki/extensions/WikibaseMediaInfomaster+18 -21
mediawiki/extensions/WikibaseLexememaster+0 -7
mediawiki/extensions/Wikibasemaster+1 -1
mediawiki/extensions/Wikibasemaster+0 -0
mediawiki/extensions/WikibaseLexemeCirrusSearchmaster+2 -2
mediawiki/extensions/WikibaseCirrusSearchmaster+2 -2
mediawiki/extensions/Wikibasemaster+3 -7
mediawiki/extensions/Wikibasemaster+0 -93
mediawiki/extensions/Wikibasemaster+14 -30
mediawiki/extensions/WikibaseLexememaster+3 -3
mediawiki/extensions/Wikibasemaster+1 -31
mediawiki/extensions/Wikibasemaster+1 -1
mediawiki/extensions/Wikibasemaster+1 -1
mediawiki/extensions/Wikibasemaster+2 -5
mediawiki/extensions/Wikibasemaster+1 -1
mediawiki/extensions/Wikibasemaster+5 -5
mediawiki/extensions/Wikibasemaster+1 -4
mediawiki/extensions/Wikibasemaster+3 -3
mediawiki/extensions/Wikibasemaster+28 -114
mediawiki/extensions/WikibaseMediaInfomaster+4 -8
mediawiki/extensions/Wikibasemaster+7 -41
mediawiki/extensions/Wikibasemaster+14 -14
mediawiki/extensions/Wikibasemaster+16 -12
mediawiki/extensions/Wikibasemaster+0 -389
mediawiki/extensions/WikibaseLexememaster+10 -27
mediawiki/extensions/Wikibasemaster+30 -18
mediawiki/extensions/Wikibasemaster+25 -328
mediawiki/extensions/WikibaseMediaInfomaster+0 -1
mediawiki/extensions/WikibaseLexememaster+5 -13
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
hashar lowered the priority of this task from Unbreak Now! to Needs Triage.Jul 6 2023, 4:32 PM

Dropping Unbreak Now! priority since I have managed to fix the issue by editing Wikidata items :]

I think that’s the correct fix, yes. Thanks @hashar! (For the record, the second edited item is https://www.wikidata.org/wiki/Q746525 – I think you accidentally pasted the same link twice.)

Also, it’s possible there are more items with IDs that are broken that way, but I don’t think it’s realistically possible for us to search for them – logstash is probably the best way. Feel free to mention any other occurrences of this error here.

Change 930872 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed references to getLocalPart in TermsRdfBuilderTest

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

Change 930873 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed EntityId "local part" from RdfVocabulary

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

Change 933105 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed EntityId "local part" from ...PageTableEntityQuery

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

Also, it’s possible there are more items with IDs that are broken that way, but I don’t think it’s realistically possible for us to search for them – logstash is probably the best way. Feel free to mention any other occurrences of this error here.

That is the part I wasn't sure. Looking for this task number T291823 in logstash over the last 7 days looks like the ones I have fixed were the only occurrences :-] So I guess we are all set.

Change 933107 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed the incorrect mention of "entity repository" in an exception

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

Change 933104 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed EntityId "local part" from WikiPageEntityMetaDataLookup

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

Change 933106 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed EntityId "local part" from RepoLinker

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

Change 933103 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed EntityId "local part" from ConceptUriSearchHelper

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

Change 930861 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed unused references to "repository prefixes" from SearchHelper

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

Change 930862 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Simplified "is of known entity type" checks in EntityIdSearchHelper

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

Change 930942 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Adopted a simplified constructor of Wikibase's SearchEntityIdHelper

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

Change 931273 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Simplified "is of known entity type" checks in EntityIdSearchHelper, part 2

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

Change 930863 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed no longer used WikibaseRepo::getEntityTypeToRepositoryMapping

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

Change 938028 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseCirrusSearch@master] Removed reference to delete WikibaseRepo::getEntityTypeToRepositoryMapping

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

Change 938028 merged by jenkins-bot:

[mediawiki/extensions/WikibaseCirrusSearch@master] Removed reference to delete WikibaseRepo::getEntityTypeToRepositoryMapping

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

Change 938225 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Removed reference to delete WikibaseRepo::getEntityTypeToRepositoryMapping

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

Change 938225 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Removed reference to delete WikibaseRepo::getEntityTypeToRepositoryMapping

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

Change 940993 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexeme@master] Removed usages of EntityId::isForeign

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

Change 941366 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexeme@master] Prepare for dropping "repo prefix" from EntityComposer

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

Change 941369 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseMediaInfo@master] Prepare for dropping "repo prefix" from EntityComposer

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

Change 941524 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] Removed unused repository name from EntityIdComposer

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

Change 941525 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseMediaInfo@master] Simplify EntityIdComposer usage code

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

Change 941526 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexeme@master] Simplify EntityIdComposer usage code

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

Change 943636 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] Removed no longer used newFromRepositoryAndNumber from ItemId/PropertyId

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

Change 930809 abandoned by Umherirrender:

[mediawiki/extensions/Wikibase@master] Remove incorrect repo prefix reference in RepoLinker

Reason:

Done with Ib4d84bdd62fb7e4c5c33a6565e5ab5b597e4454f

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

Change 930810 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Simplified RepoLinkerTest name

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

Change 941369 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Prepare for dropping "repo prefix" from EntityComposer

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

Change 940993 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Removed usages of EntityId::isForeign

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

Change 941366 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Prepare for dropping "repo prefix" from EntityComposer

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

Change 933110 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Prepare removal of the unused repository name concept from EntityIdComposer

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

Change 933108 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed (Serializable)EntityId::isForeign

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

Change 947360 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/WikibaseMediaInfo@master] Temporarily build MediaInfoId without EntityIdComposer

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

Change 947360 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Drop not needed EntityIdComposer::composeEntityId arg

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

Change 941524 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed unused repository name from EntityIdComposer

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

Change 941525 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Simplify EntityIdComposer usage code

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

Change 941526 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Simplify EntityIdComposer usage code

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

Change 943636 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed no longer used newFromRepositoryAndNumber from ItemId/PropertyId

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

Change 948168 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] Formally disallowed using colons/prefixes in the Item/Property ID

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

Change 948169 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexeme@master] Temporarily disabled tests involving prefixed Lexeme IDs

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

Change 948170 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexeme@master] Confirm it is impossible to have colons in Lexeme IDs

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

Change 952323 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] Removed the usage of splitSerialization from DispatchingIdParser

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

Change 952358 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] DM: Removed the use of split/join Serialization from Item/Property ID

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

Change 952359 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexeme@master] Removed the use of split/join Serialization in LexemeId and FormId

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

Change 952323 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed the usage of splitSerialization from DispatchingIdParser

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

Change 952785 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] Removed SerializableEntityId::joinSerialization

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

Change 952806 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] Removed SerializableEntityId::splitSerialization

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

Change 953993 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] Dropped "repository name" and "local part" from EntityId

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

Change 948169 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Temporarily disabled tests involving prefixed Lexeme IDs

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

Change 948168 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Formally disallowed using colons/prefixes in the Item/Property ID

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

Change 948170 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Confirm it is impossible to have colons in Lexeme IDs

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

Change 952359 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Removed the use of split/join Serialization in LexemeId and FormId

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

Change 952358 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] DM: Removed the use of split/join Serialization from Item/Property ID

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

Change 952785 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed SerializableEntityId::joinSerialization

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

Change 952806 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed SerializableEntityId::splitSerialization

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

Change 954127 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexeme@master] Removed the use of EntityId::localPart from ID classes

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

Change 954128 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexeme@master] Stop calling getRepositoryName and getLocalPart in tests

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

Change 954129 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexeme@master] Stop setting repositoryName and localPart

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

Change 954133 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] Removed RepositoryNameAssert

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

Change 954136 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseMediaInfo@master] Stop setting repositoryName and localPart

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

Change 954137 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseMediaInfo@master] Removed repositoryName and localPart from MediaInfoId

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

Change 954138 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] Stopped using EntityId::getLocalPart in DescriptionLookupTest

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

Change 954127 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Removed the use of EntityId::localPart from ID classes

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

Change 954128 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Stop calling getRepositoryName and getLocalPart in tests

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

Change 954129 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Stop setting repositoryName and localPart

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

Change 954136 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Stop setting repositoryName and localPart

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

Change 954138 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Stopped using EntityId::getLocalPart in DescriptionLookupTest

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

Change 953993 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Dropped "repository name" and "local part" from EntityId

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

Change 954137 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Removed repositoryName and localPart from MediaInfoId

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

Change 929422 abandoned by WMDE-leszek:

[mediawiki/extensions/Wikibase@master] Added a test confirming Wikibase accepts incorrect IDs with a "prefix"

Reason:

Fails as expected. Bug removed

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

Change 927726 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Assert that foreign entity IDs are no longer supportes

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

Change 954399 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/WikibaseLexeme@master] Removed reference to repositoryName and localPart in ID classes

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

Change 954133 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Removed RepositoryNameAssert

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

Change 954399 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Removed reference to repositoryName and localPart in ID classes

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

Change 927707 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Assert that foreign entity IDs are no longer supported

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

Also, it’s possible there are more items with IDs that are broken that way, but I don’t think it’s realistically possible for us to search for them – logstash is probably the best way. Feel free to mention any other occurrences of this error here.

A wd:Q100 in a lexeme lexical category is causing this error as soon as you try to view the old revision or a history / contributions containing it: T349982: [REPO][SW] Wikibase\DataModel\Services\Lookup\EntityLookupException: Failed to unserialize the content object.