Page MenuHomePhabricator

wdqs-common: Upgrade Sesame 2.8.11 to rdf4j >= 5.3
Open, In Progress, Needs TriagePublic

Description

The version of Sesame used for all things RDF in wdqs-common (and, by extension the producer, the consumer, and the data processing tools) is very old and unsupported. Sesame has since been renamed to rdf4j.
In T430312 it was necessary to already port the JSON SPARQL parsing to rdf4j. Now the rest shouls follow.

AC:

  • wdqs-common is fully ported to rdf4j and does not depend on any Sesame components anymore
  • wdqs-streaming-consumer uses the latest version of wdqs-common without Sesame
  • wdqs-streaming-producer uses the latest version of wdqs-common without Sesame
  • wdqs-data-processing uses the latest version of wdqs-common without Sesame

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Upgrade from OpenRDF/Sesame 2.8.x to RDF4j 5.3.2repos/wikidata-platform/wdqs/wdqs-common!10truegrdf4jPortmain
Customize query in GitLab

Event Timeline

trueg changed the task status from Open to In Progress.Wed, Sep 9, 10:24 AM
trueg claimed this task.

Upgrading from OpenRDF 2.8.x to RDF4j 4.5.x is mostly trivial. For the most part, the two are code-compatible. The only notable changes are:

  • Instead of manually creating a ValueFactory in order to construct different node/resource instances, we now make use of the static litereal(), iri(), bnode() functions. The only real difference is, that these include syntax checks, which the original ValueFactory did not. Thus, in some cases, we need to fall back to a SimpleValueFactory (mostly tests) which does not validate syntax.
  • URI is now IRI, but that's about it
  • Literal::getLanguage() now returns an Optional rather than a String or null. This required changes to several null checks which are not valid anymore.

For more information check the migration guide: https://rdf4j.org/documentation/reference/migration

Change #1344706 had a related patch set uploaded (by Trueg; author: Trueg):

[operations/deployment-charts@master] Bump wdqs-streaming-consumer version to 0.3.1 on wdqs-next main eqiad

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

Change #1344706 merged by jenkins-bot:

[operations/deployment-charts@master] Bump wdqs-streaming-consumer version to 0.3.1 on wdqs-next main eqiad

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