Skip to content

#6067 - Upgrade to RDF4J 6.x#6074

Open
reckart wants to merge 2 commits into
mainfrom
refactoring/6067-Upgrade-to-RDF4J-6.x
Open

#6067 - Upgrade to RDF4J 6.x#6074
reckart wants to merge 2 commits into
mainfrom
refactoring/6067-Upgrade-to-RDF4J-6.x

Conversation

@reckart

@reckart reckart commented May 25, 2026

Copy link
Copy Markdown
Member

What's in the PR

  • RDFJ4 -> 6.0.0-M1

How to test manually

  • No specific test procedure

Automatic testing

  • PR includes unit tests

Documentation

  • PR updates documentation

@reckart reckart added this to the 42.0 milestone May 25, 2026
@reckart reckart self-assigned this May 25, 2026
@reckart reckart added this to Kanban May 25, 2026
@github-project-automation github-project-automation Bot moved this to 🔖 To do in Kanban May 25, 2026
@reckart reckart requested a review from Copilot May 25, 2026 16:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades the project’s RDF4J dependency line to 6.x and adapts INCEpTION’s KB module to RDF4J 6’s HTTP client SPI changes, including updates to query-building behavior and related tests.

Changes:

  • Bump RDF4J version to 6.0.0-M1 and add rdf4j-http-client-api to dependency management and the KB module.
  • Replace Apache HttpClient-based per-thread SSL-check toggling with an RDF4JHttpClient implementation that switches between strict and trust-all clients.
  • Adjust SPARQL query generation to avoid “FILTER-only” primary queries by introducing/promoting a FILTER EXISTS wrapper, and add a test covering “too old” Lucene index version reporting.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pom.xml Updates the global RDF4J version property to 6.0.0-M1.
inception/inception-dependencies/pom.xml Adds RDF4J HTTP client API to centralized dependency management.
inception/inception-kb/pom.xml Adds rdf4j-http-client-api and scopes Apache HttpClient deps to tests.
inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/http/PerThreadSslCheckingHttpClientUtils.java Reimplements per-thread SSL verification switching using RDF4J’s HTTP client SPI.
inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/KnowledgeBaseServiceImpl.java Wires the new RDF4J HTTP client into the repository manager.
inception/inception-kb/src/main/java/de/tudarmstadt/ukp/inception/kb/querybuilder/SPARQLQueryBuilder.java Wraps certain restrictions to allow promotion from FILTER EXISTS into WHERE patterns when needed.
inception/inception-kb/src/test/java/de/tudarmstadt/ukp/inception/kb/FullTextIndexUpgradeTest.java Adds a test ensuring “too old” index versions are detected and reported.
inception/inception-kb/src/test/java/de/tudarmstadt/ukp/inception/kb/util/TestFixtures.java Updates tests to use the new RDF4J HTTP client factory method.
inception/inception-kb/src/test/java/de/tudarmstadt/ukp/inception/kb/querybuilder/SPARQLQueryBuilderLocalTestScenarios.java Updates local test scenarios to use the new RDF4J HTTP client factory method.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@reckart reckart force-pushed the refactoring/6067-Upgrade-to-RDF4J-6.x branch 4 times, most recently from 72e40c1 to 7bde38a Compare May 31, 2026 20:40
reckart added 2 commits June 7, 2026 16:45
- RDFJ4 -> 6.0.0-SNAPSHOT
- Java 21 -> 25
- Strip URL-embedded credentials before reaching Apache HttpClient 5 (used by RDF4J 6, which rejects URIs with a userinfo component)
- Sanitize incoming SPARQL URLs in getRemoteConfig(url) — userinfo is stripped at config-creation time and a warning is logged
- Add eager startup migration: walk every REMOTE KB at onContextRefreshed, split any embedded user:pass into a clean URL plus BasicAuthenticationTraits (only when the KB has no explicit auth traits yet), persist via updateKnowledgeBase
- Factor out splitUrlUserInfo helper and refactor applyBasicHttpAuthenticationConfigurationFromUrl to share it as a runtime safety net
- buildSparqlRepository test helper splits userinfo and applies credentials via setUsernameAndPassword so existing test fixtures keep passing URLs with embedded credentials
@reckart reckart force-pushed the refactoring/6067-Upgrade-to-RDF4J-6.x branch from 7bde38a to 95640db Compare June 7, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 🔖 To do

Development

Successfully merging this pull request may close these issues.

2 participants