-
Notifications
You must be signed in to change notification settings - Fork 33
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
Address translation #624
Address translation #624
Conversation
PR Review ChecklistDo not edit the content of this comment. The PR reviewer should simply update this comment by ticking each review item below, as they get completed. Trivial Change
Code
Architecture
|
d23e2dd
to
af35581
Compare
…sed addresses as names" This reverts commit f6f4c6f.
53b1f9c
to
ecd277d
Compare
test-python-integration-core: | ||
test-python-integration: |
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.
Unified integration tests across languages.
* @param addresses The address(es) of the TypeDB server(s) | ||
* @param addresses The address(es) of the TypeDB server(s) or translation map from addresses | ||
* received from the TypeDB server(s) to addresses to be used by the driver for connection |
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.
Constructor overloads don't seem to get separate docs generated.
Driver Driver::coreDriver(const std::string& coreAddress) { | ||
auto p = _native::connection_open_core(coreAddress.c_str()); | ||
Driver Driver::coreDriver(const std::string& address) { | ||
auto p = _native::connection_open_core(address.c_str()); |
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.
Bring in line with declaration.
* @param addresses The address(es) of the TypeDB server(s) | ||
* @param addresses The address(es) of the TypeDB server(s) or translation map from addresses | ||
* received from the TypeDB server(s) to addresses to be used by the driver for connection |
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.
Same as C++, separate docs for overloaded ctors aren't generated.
elif isinstance(addresses, Mapping): | ||
return _Driver(dict(addresses), credential) |
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.
A Mapping
is an Iterable
, but not vice versa, so this check must come first.
## Usage and product changes We allow connection to the cloud servers using an address translation mapping (cf. typedb/typedb-driver#624). This is useful when the route from the user to the servers differs from the route the servers are configured with (e.g. connection to public-facing servers from an internal network). Example usage: ```bash console \ --cloud=typedb1.domain.com:1729=typedb.local:11729,typedb2.domain.com:1729=typedb.local:21729 \ --username=<user> --password=<password> ``` or: ```bash console \ --cloud=typedb1.domain.com:1729=typedb.local:11729 \ --cloud=typedb2.domain.com:1729=typedb.local:21729 \ --username=<user> --password=<password> ``` Note: we currently require that the user provides translation for the addresses of _all_ nodes in the Cloud deployment. ## Implementation We also update the license headers and file from AGPL to MPL 2.0.
## Usage and product changes We introduce a way to provide address translation when attempting to connect to cloud servers (cf. typedb/typedb-driver#624). This is useful when the route from the user to the servers differs from the route the servers are configured with (e.g. connection to public-facing servers from an internal network). Note: we currently require that the user provides translation for the addresses of _all_ nodes in the Cloud deployment. <img width="532" src="https://github.com/vaticle/typedb-studio/assets/18616863/74859fbd-de4f-4844-b1e6-f3507dc364b7">
Usage and product changes
We allow the user to provide a translation map from the advertised server addresses (now treated as generic server names) to the actual addresses the driver shall use to connect to the cloud instances. We require the user to provide the full mapping.
Example usage:
Python:
Rust: