-
Notifications
You must be signed in to change notification settings - Fork 54
Introduce aura_instance_id parameter #959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for neo4j-graph-data-science-client canceled.
|
38a229e to
e52a088
Compare
|
this is needed in 2 main cases:
|
e52a088 to
56f2b6e
Compare
56f2b6e to
de87abc
Compare
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
de87abc to
d789559
Compare
| 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 | ||
| ) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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
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