Page MenuHomePhabricator

Treat entities from unknown repositories as missing entity, not a config error
Closed, ResolvedPublic

Description

When accessing an entity based on a foreign entity ID, we may encounter a repository prefix that cannot be resolved; This should not happen, but it can reasonably happen, e.g. when a remote repository went offline; We then still want to be able to load (old) revisions that reference that repository, without triggering a hard error.

Essentially, EntityIds, with prefix or not, should be treated as user input, and any problems with their form and content should be handled leniently. EntityIds that refer to an unknown repository should be treated like EntityIds that refer to a non-existign local item. If possible (e.g. when throwing an exception), additional information should be given. But in situations where there is no back-channel for such information, it's OK for IDs refering to an unknown repo to behave just like IDs refering to an unknown entity on a known repo.

Related Objects

StatusAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenNone
ResolvedAbit
DuplicateNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
StalledNone
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedWMDE-leszek

Event Timeline

daniel created this task.Nov 9 2016, 1:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 9 2016, 1:16 PM
daniel triaged this task as High priority.Nov 9 2016, 1:22 PM

bump to high, since this blocks a release of the services component.

WMDE-leszek moved this task from proposed to doing on the WMDE-TLA-Team board.

Pull request on github adjusting DispatchingEntityLookup: https://github.com/wmde/WikibaseDataModelServices/pull/160

AFAIK all of services we have touched so far (T146989, T149686, T146990, T149581) consider the issue outlined here as intended.
In particular, WikiPageEntityMetaDataLookup is the only service throwing the exception when given the entity from some other repository. As we have discussed this seems reasonable in case of this particular service. If the "wrong" entity ended up being passed down to it, it clearly indicates some configuration issues.
Others, ie. DispatchingEntityLookup, DispatchingEntityRevisionLookup, DispatchingTermBuffer treat such entities as "normal" missing entities. This matches the expected behaviour, as we understand it now.

Do we want to keep this ticket open and link it to incoming tickets? Or do we want to mark it as done once all related tickets are "done" too?

daniel closed this task as Resolved.Nov 15 2016, 5:41 PM

I think it's done for now. WE should of course keep this in mind for the future.