Skip to content

Conversation

@FlorentinD
Copy link
Contributor

allow to explicitly pass it.
This is important if the original Aura instance id not part of the uri. Such as for multi-db support

ref GDSA-283

@netlify
Copy link

netlify bot commented Sep 18, 2025

Deploy Preview for neo4j-graph-data-science-client canceled.

Name Link
🔨 Latest commit a680433
🔍 Latest deploy log https://app.netlify.com/projects/neo4j-graph-data-science-client/deploys/6929a2c939e1190008e6b2fc

@FlorentinD FlorentinD force-pushed the gds-session-override-instance-id branch from 38a229e to e52a088 Compare September 18, 2025 15:55
@FlorentinD
Copy link
Contributor Author

FlorentinD commented Sep 19, 2025

this is needed in 2 main cases:

  • instances with multi-db enabled (this will increase in the future)
  • the customer has the original uri behind a proxy with a different uri (unknown how often)

@FlorentinD FlorentinD force-pushed the gds-session-override-instance-id branch from e52a088 to 56f2b6e Compare September 30, 2025 14:26
@FlorentinD FlorentinD requested a review from DarthMax September 30, 2025 14:28
@FlorentinD FlorentinD force-pushed the gds-session-override-instance-id branch from 56f2b6e to de87abc Compare October 17, 2025 10:01
allow to explicitly pass it.
This is important if the original Aura instance id not part of the uri. Such as for multi-db support

ref GDSA-283
@FlorentinD FlorentinD force-pushed the gds-session-override-instance-id branch from de87abc to d789559 Compare November 28, 2025 12:52
Comment on lines +6 to +17
def hosted_in_aura(db_runner: Neo4jQueryRunner) -> bool:
return (
db_runner.run_retryable_cypher("""
CALL dbms.components() YIELD name, versions
WHERE name = "Neo4j Kernel"
UNWIND versions as v
WITH name, v
WHERE v ENDS WITH "aura"
RETURN count(*) <> 0
""").squeeze()
is True
)
Copy link
Contributor

Choose a reason for hiding this comment

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

The formatting here is very strange

database: str | None = None
# Optional: typed authentication, used instead of username/password. Supports for example a token. See https://neo4j.com/docs/python-manual/current/connect-advanced/#authentication-methods
auth: Auth | None = None
aura_instance_id: str | None = None
Copy link
Contributor

Choose a reason for hiding this comment

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

Could it be a either or thing between this and the uri? If the instance id is set we can try to guess the URI?

f"Aura instance with id `{db_connection.aura_instance_id}` could not be found. Please verify that the instance id is correct and that you have access to the Aura instance."
)
else:
raise ValueError(
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a strange place for this error. I think it would be more clear if we checked if the aura_instance_id variable is None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants