Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Cluster server client: stub creation depends on stub #273

Closed
dmitrii-ubskii opened this issue Dec 13, 2022 · 1 comment · Fixed by #281
Closed

Cluster server client: stub creation depends on stub #273

dmitrii-ubskii opened this issue Dec 13, 2022 · 1 comment · Fixed by #281

Comments

@dmitrii-ubskii
Copy link
Member

Description

Potential circular dependency in https://github.com/vaticle/typedb-client-python/blob/master/typedb/connection/cluster/server_client.py.

The constructor of _ClusterServerClient calls _ClusterServerClient.new_channel_and_stub() during creation of the channel and the gRPC _stub of a server client (L36),
which calls _ClusterServerClient._new_channel() (L49),
which references a yet-not-created self._stub in a lambda that it passes to grpc.metadata_call_credentials() (L60),
which, if it calls the lambda at that point, correctly raises AttributeError: '_ClusterServerClient' object has no attribute '_stub'.

@alexjpwalker
Copy link
Member

Hopefully this issue will dissolve when we call Rust via FFI.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants