Neptune GSP: Use UUID graph URIs instead of explicit default graph#345
Merged
jpmccu merged 3 commits intofeature/neptunefrom Jan 4, 2026
Merged
Conversation
Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update GSP implementation to use UUID-generated graph URI
Neptune GSP: Use UUID graph URIs instead of explicit default graph
Jan 4, 2026
jpmccu
approved these changes
Jan 4, 2026
jpmccu
added a commit
that referenced
this pull request
Jan 8, 2026
* Added initial support for neptune * Initial neptune implementation * Add Neptune plugin database driver with AWS IAM authentication and CloudFormation template (#344) * Initial plan * Add Neptune plugin IAM authentication support with database driver Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Address code review comments: add logging, imports, and documentation Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Add Neptune IAM authentication documentation to ReadTheDocs Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Expand Neptune how-to guide with detailed endpoint configuration Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Fix Neptune entity resolver to correctly use FTS service with proper escaping Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Add CloudFormation template for Neptune serverless setup with FTS Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Refactor Neptune driver to use custom session instead of subclassing Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Upgrade to rdflib 7.1.1 and simplify Neptune driver with custom session Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Use aws_requests_auth and custom_requests parameter for simpler Neptune driver Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Address code review: fix SPARQL injection, reuse session, improve efficiency Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Add test for Neptune driver registration in plugin init Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Remove redundant conditional check in driver registration test Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Neptune GSP: Use UUID graph URIs instead of explicit default graph (#345) * Initial plan * Add temporary UUID graph functionality for Neptune GSP operations Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Complete Neptune GSP temporary UUID graph implementation with tests Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * update UI and search * Improved exception handling in the query filter. * added more info to the exception message * Add NeptuneBoto3Store with SPARQL blueprint authentication interface and improved error reporting (#347) * Initial plan * Add NeptuneBoto3Store with instance metadata support Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Add comprehensive documentation for NeptuneBoto3Store Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Add example script for NeptuneBoto3Store usage * Override query() and update() methods to enable authenticated access Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Update neptune_driver to use NeptuneBoto3Store Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Add raw_sparql_request interface and improve Neptune error reporting Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * debugging and sorting out the driver initialization issues * Fix query() and update() method signatures to properly override SPARQLStore interface Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Fix _request method error handling and add comprehensive tests for response_mime_types usage Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> * Fix HTTP error handling and add response_mime_types method to NeptuneBoto3Store Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com> Co-authored-by: Jamie McCusker <mccusj2@rpi.edu> * Update version from 2.4.0.dev0 to 2.4.0.beta14 --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: jpmccu <602385+jpmccu@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Neptune's GSP implementation was inserting all triples into an explicit default graph (via
?defaultparameter), breaking graph-aware semantics for TriG and other multi-graph formats. Named graphs were being flattened instead of preserved.Changes
publish,put,post): Generate temporary UUID graph URI (urn:uuid:...), POST/PUT to that graph, then DELETE it. This forces Neptune to process graph-aware RDF correctly._use_temp_graphoption (default:True) for opt-out backward compatibilityUsage
The UUID graph approach triggers Neptune's union graph semantics instead of explicit default graph insertion, preserving named graph structure from TriG data.
Note
Code review identified pre-existing serialization behavior in
put()/post()that may serialize entire store instead of target graph. This matches existingdatabase_utils.pyimplementation and is outside scope of this fix.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
neptune.example.com/usr/bin/python3 python3 -m pytest tests/unit/test_neptune_plugin.py::TestNeptuneGSPOperations -v(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.