Skip to content
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

fix: use an insecure channel under emulation #254

Merged
merged 8 commits into from Nov 12, 2020
5 changes: 2 additions & 3 deletions google/cloud/firestore_v1/base_client.py
Expand Up @@ -25,6 +25,7 @@
"""

import os
import grpc

import google.api_core.client_options # type: ignore
import google.api_core.path_template # type: ignore
Expand Down Expand Up @@ -147,9 +148,7 @@ def _firestore_api_helper(self, transport, client_class, client_module) -> Any:
# We need this in order to set appropriate keepalive options.

if self._emulator_host is not None:
# TODO(microgen): this likely needs to be adapted to use insecure_channel
# on new generated surface.
channel = transport.create_channel(host=self._emulator_host)
channel = grpc.insecure_channel(self._emulator_host)
else:
channel = transport.create_channel(
self._target,
Expand Down