Open kysrpex opened 3 years ago
I looked at this report a while ago and I guess I misread it to say you had solved the problem. I now see you just found a workaround. I gather the problem is with the spec.federate function. Any additional information you have would be helpful. You can post it here or send it to support@franz.com referencing spr45420. David Margolies, Franz Inc.
While working with agraph-python, I experienced an issue that might be a bug in agraph-python itself.
I am running the v7.0.4 version of the franzinc/agraph Docker image in a CI machine through GitLab-runner. The relevant part of the file GitLab-ci configuration file looks like this.
The important thing to note is that the agraph image was given the alias
db
.At a certain point, I am trying to reuse the spec string of two existing
franz.openrdf.repository.repositoryconnection.RepositoryConnection
objects, to perform a federated SPARQL query.self._server
is an AllegroGraphServer object, created with the same username, password and host arguments asself._ontology_engine
andself._engine
, which areRepositoryConnection
objects, created withag_connect
, which are working.After that, I call
tuple_query.evaluate()
and get the following error:Actually, the
spec_federated
string is not exactly as the RequestError reports, the value is:<http://XXX:YYY@db:10035/repositories/simphony-ontologies>{<http://www.osp-core.com/agraph_session_id#1e444591-b5d9-4e9a-80c3-b0566ee85074>} + <http://XXX:YYY@db:10035/repositories/test_osp_core_transfer>
.I thought this did not make much sense, so I just tried resolving the host name with the sockets library and replacing the IP in the spec string.
Surprisingly, after this change
tuple_query.evaluate()
works as expected, and the results of the query are correct. In the end I just worked around the issue by writing a function that resolves all host names in a spec string and replaces them.Let me know if you need more information to locate the source of the problem.