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

StatusSubtypeAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenFeatureNone
OpenFeatureNone
DuplicateNone
ResolvedNone
ResolvedNone
ResolvedNone
OpenNone
OpenNone
StalledNone
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedWMDE-leszek

Event Timeline

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.

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?

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