Page MenuHomePhabricator

[Federated Items] Source Configuration
Closed, ResolvedPublic

Description

RemoteEntitySearchClient's getRemoteApiUrl() indicates there is at most one APIEntitySource with a populated repoApiUrl. I would expect this to only return the first source if there are multiple set up, which would be a problem. There is not a test set up for this scenario.

EntitySourceDefinitionsConfigParser - Seems perfectly possible to configure multiple federation sources. No test set up for this scenario.

THESE TWO ARE IN CONFLICT, and besides that, I'm unconvinced we should handle pulling any federation sources from config at this point.

PLEASE DECIDE WHICH WE SHOULD DO:

  1. Allow configuration of multiple federation sources; fix getRemoteApiUrl(), set up test cases for the config parser
  2. Allow configuration of at most one federation source; set a todo on getRemoteApiUrl(), set up test cases for the config parser.
  3. Disallow configuration of federation sources - Wikidata or nothing. Update Config parser, set a todo on getRemoteApiUrl(), set up test cases for the config parser.
  • EntitySourceDefinitionsConfigParser - configuration for federated values sources removed, test cases checked for all scenarios and added as necessary
  • Add a note on getRemoteApiUrl() that it will need fixing if we allow configuration of federated values sources

Details

Related Changes in Gerrit:

Event Timeline

In principle I would say we should prepare for multiple federation sources - that being said I think this might be something we could expand later and limit to Wikidata for now, if it is relatively trivial to adjust in retrospect. Happy to hear Leif's perspective on this however since it is ultimately a Product decision.

As discussed with @Lydia_Pintscher this week: We do not want to provide the option of multiple federation sources. Wikidata or nothing (for now)

Yes I think this is the right way to go.
Longer-term: I think more than one federation source per wiki would increase the complexity for editors considerably so unless we have very very clear demand for it I would really not do it. Federating with something other than Wikidata makes a lot of sense for a future iteration imho.

Great, thank you for the decision.

Proposed AC for the ticket:

  • EntitySourceDefinitionsConfigParser - configuration for federated values sources removed, test cases checked for all scenarios and added as necessary
  • Add a note on getRemoteApiUrl() that it will need fixing if we allow configuration of federated values sources

I'm blanking at the moment of where exactly an "ensure concept uri valid" method would be, but assuming that exists, narrow it's allowable federated value uris to Wikidata entities

Leif_WMDE changed the task status from Open to In Progress.Mar 19 2026, 5:05 PM

Change #1270893 had a related patch set uploaded (by Ricki Jay; author: Ricki Jay):

[mediawiki/extensions/Wikibase@REL1_45] Limit Sources to Wikidata

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

Leif_WMDE renamed this task from [Federated Values] Source Configuration to [Federated Items] Source Configuration.May 12 2026, 1:00 PM