Page MenuHomePhabricator

Allow federated queries with the NLG endpoint (data.nlg.gr)
Closed, ResolvedPublic1 Estimated Story Points

Description

Could you please whitelist the following SPARQL endpoint:

https://data.nlg.gr/query

This is a SPARQL endpoint used by the National Library of Greece (NLG), whose authority file is linked from Wikidata through https://www.wikidata.org/wiki/Property:P3348; of course it is the most important authority file in Greek language, and it links to Wikidata. Example query (giving all auth IDs from NLG linking to WD):

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rda: <http://rdaregistry.info/Elements/a/datatype/>
SELECT * WHERE {
 ?sub rda:P50094 ?obj .
 FILTER(REGEX(STR(?sub), "A"))
 FILTER(REGEX(?obj, "entity\\/Q"))
}

Event Timeline

Epidosis updated the task description. (Show Details)
Gehel set the point value for this task to 1.Jun 5 2023, 3:47 PM
bking moved this task from Ready for Work to In Progress on the Data-Platform-SRE board.
bking updated Other Assignee, added: RKemper.

Change 952941 had a related patch set uploaded (by Bking; author: Bking):

[operations/puppet@production] wdqs: Add new federation endpoint

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

Change 952941 merged by Ryan Kemper:

[operations/puppet@production] wdqs: Add new federation endpoint

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

Mentioned in SAL (#wikimedia-operations) [2023-08-28T21:56:09Z] <ryankemper@deploy1002> Started deploy [wdqs/wdqs@16e3dcf]: T337296 restart services for new federation endpoint

Mentioned in SAL (#wikimedia-operations) [2023-08-28T21:57:21Z] <ryankemper@deploy1002> Finished deploy [wdqs/wdqs@16e3dcf]: T337296 restart services for new federation endpoint (duration: 01m 12s)

@Epidosis sorry for the delay on this ticket. We've added your endpoint, can you please test it and let us know if it works? Thanks for your patience.

Thanks! I checked with an easy one, https://w.wiki/7Mv3, and it fails due to

Could not identify format for service response: serviceURI=https://data.nlg.gr/query,

Probably it is a problem on NLG side, I have just reported them.

Thanks for the quick response. It could very well be our fault, as we just changed how we deploy our federation allowlist . Thus, we'll continue to troubleshoot from our side as well.

Quick check, it looks that https://data.nlg.gr/query is the URL to the UI, but the SPARQL endpoint itself lives at https://data.nlg.gr/sparql

Change 954119 had a related patch set uploaded (by Ryan Kemper; author: Ryan Kemper):

[operations/puppet@production] wdqs: use proper sparql endpoint

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

Change 954119 merged by Ryan Kemper:

[operations/puppet@production] wdqs: use proper sparql endpoint

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

Thanks. I retried the previous one changing "query" into "sparql", but something is still mistaken: https://w.wiki/7NTz gives error 500 ... I don't have an answer from NLG yet.

It looks like there is an issue with the SSL cert on data.nlg.gr.

Also, this server seems to require an explicit Accept HTTP header. Example:

curl -k -XPOST -H"Accept:application/sparql-results+json" --data-urlencode "query=select * { <iri1> <iri2> <iri3> } LIMIT 1"  https://data.nlg.gr/sparql

We are not going to support federation with endpoints that require specific headers. So I'm closing this ticket. The federation from WDQS to data.nlg.gr is allowed in our configuration, so if that endpoint starts returning data without the need for an explicit HTTP header, federation should start working.