Page MenuHomePhabricator

wdqs-updater configuration and data validation issues
Open, Needs TriagePublic


Once a public docker setup of Wikibase is using SiteLinks to connect local items with local wikipages, the updating process that feeds changes to the query service will stop working, complaining about not being able to update any item that contains site links. Example error message:

artbase-query-updater | org.wikidata.query.rdf.tool.rdf.Munger$BadSubjectException: Unrecognized subjects:  [,,,,,,,,].  Expected only sitelinks and subjects starting with http://wikibase.svc/wiki/Special:EntityData/ and [http://wikibase.svc/entity/]

Of course this has all kinds of side effects on the whole setup, basically the SPARQL endpoint is not reflecting the contents of the local Wikibase.

In the default docker-compose.yaml, WIKIBASE_HOST is set to wikibase.svc. AFAIK it is not documented where exactly this variable is used. Anyway, in no case wikibase.svc would be a meaningful SiteLink host, since this DNS name is only accessible from within the docker network.

Relevant excerpt from default docker-compose.yaml:

  image: wikibase/wdqs:0.3.10
  restart: unless-stopped
  command: /
  - wdqs
  - wikibase
       - wdqs-updater.svc
   - WIKIBASE_HOST=wikibase.svc
   - WDQS_HOST=wdqs.svc
   - WDQS_PORT=9999

This appears connected to T264009, in which the main issue is the use of a URL variable for very different purposes, under the assumption that all URLs must be globally accessible.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

When chaning WIKIBASE_HOST to, SiteLinks are still rejected, probably because the protocol is assumed to be http instead of https:

artbase-query-updater | 14:18:50.580 [update 2] INFO  o.wikidata.query.rdf.tool.rdf.Munger - Unrecognized subjects: [,,,,,,,,] while processing  Expected only sitelinks and subjects starting with and []

In general it seems weird that wdqs-updater is doing its own validation of data it is supposed to shove into wdqs: if there is any issue with any kind of data, it must be flagged on creation in Wikibase.

I was able to fix the local issue by adding WIKIBASE_SCHEME=https to wdqs-updater environment.

The issues remain:

  • two variables (instead of one) define a URL that is used for both API access and data validation. This makes a setup not portable and greatly hinders local testing.
  • data should not be validated in the updater (I guess structural RDF validation happens, that cannot cause harm)

I guess this task has to be renamed 😉

despens renamed this task from wdqs-updater stops working once SiteLinks are used to wdqs-updater configuration and data validation issues.Nov 21 2020, 3:13 PM