Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
fix: remove gRPC send/recv limits; expose client transport (#117)
Browse files Browse the repository at this point in the history
* changes without context

        autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.

* build(java): use actions/github-script v3 tag rather than full semver

So that renovate-bot stops proposing PRs like [this](https://github.com/googleapis/java-bigquerydatatransfer/pull/515/files)!

Source-Author: Stephanie Wang <stephaniewang526@users.noreply.github.com>
Source-Date: Tue Nov 17 13:02:02 2020 -0500
Source-Repo: googleapis/synthtool
Source-Sha: 7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58
Source-Link: googleapis/synthtool@7fcc405

* chore: migrate redis to the Java microgenerator

Committer: @miraleung
PiperOrigin-RevId: 346121774

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Dec 7 10:20:09 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: fa1a1755bb7d1d211261906886d9608359ba23d9
Source-Link: googleapis/googleapis@fa1a175

* feat: Add ListSkus, ListOffers API definitions for Cloud Channel API.

PiperOrigin-RevId: 346583784

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Dec 9 10:34:16 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: a53dc0292aad8a7739e44c2165476874ddc487bf
Source-Link: googleapis/googleapis@a53dc02

* feat: Add the `UNORDERED_LIST` enum value for `google.api.field_behavior`.

Also includes minor documentation changes that seem to have been made
in the interim and never published.

PiperOrigin-RevId: 346664095

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Dec 9 16:35:05 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 468a94a87b9f80d22d1f5e3076d5bab73a5c996f
Source-Link: googleapis/googleapis@468a94a

* docs: restructured AudioConfig API

PiperOrigin-RevId: 346910607

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Dec 10 18:45:11 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: c38c7708c09271e3dd4799541583f9fd0e95fc6a
Source-Link: googleapis/googleapis@c38c770

* chore: add resource_definitions for Cluster and Service

Committer: @miraleung
PiperOrigin-RevId: 347029491

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri Dec 11 10:43:21 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: bddb3d7479894576e61a6c88fa745bb24f4c98f7
Source-Link: googleapis/googleapis@bddb3d7

* chore: update gapic-generator-java to 0.0.11

Committer: @miraleung
PiperOrigin-RevId: 347036369

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri Dec 11 11:13:47 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 6d65640b1fcbdf26ea76cb720de0ac138cae9bed
Source-Link: googleapis/googleapis@6d65640

* fix: remove client recv msg limit fix: add enums to `types/__init__.py`

PiperOrigin-RevId: 347055288

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri Dec 11 12:44:37 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: dd372aa22ded7a8ba6f0e03a80e06358a3fa0907
Source-Link: googleapis/googleapis@dd372aa

* fix: fixed config for Python and Java grpc lib

PiperOrigin-RevId: 348952930

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Dec 24 13:19:36 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 69697504d9eba1d064820c3085b4750767be6d08
Source-Link: googleapis/googleapis@6969750
  • Loading branch information
yoshi-automation authored Dec 29, 2020
1 parent ee093a8 commit 6f27109
Show file tree
Hide file tree
Showing 41 changed files with 486 additions and 170 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
_transport_registry["grpc"] = AutoscalingPolicyServiceGrpcTransport
_transport_registry["grpc_asyncio"] = AutoscalingPolicyServiceGrpcAsyncIOTransport


__all__ = (
"AutoscalingPolicyServiceTransport",
"AutoscalingPolicyServiceGrpcTransport",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -166,6 +170,10 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

self._stubs = {} # type: Dict[str, Callable]
Expand All @@ -192,7 +200,7 @@ def create_channel(
) -> grpc.Channel:
"""Create and return a gRPC channel object.
Args:
address (Optionsl[str]): The host for the channel to use.
address (Optional[str]): The host for the channel to use.
credentials (Optional[~.Credentials]): The
authorization credentials to attach to requests. These
credentials identify this application to the service. If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -211,6 +215,10 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

# Run the base constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
_transport_registry["grpc"] = ClusterControllerGrpcTransport
_transport_registry["grpc_asyncio"] = ClusterControllerGrpcAsyncIOTransport


__all__ = (
"ClusterControllerTransport",
"ClusterControllerGrpcTransport",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -167,9 +171,14 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

self._stubs = {} # type: Dict[str, Callable]
self._operations_client = None

# Run the base constructor.
super().__init__(
Expand All @@ -193,7 +202,7 @@ def create_channel(
) -> grpc.Channel:
"""Create and return a gRPC channel object.
Args:
address (Optionsl[str]): The host for the channel to use.
address (Optional[str]): The host for the channel to use.
credentials (Optional[~.Credentials]): The
authorization credentials to attach to requests. These
credentials identify this application to the service. If
Expand Down Expand Up @@ -240,13 +249,11 @@ def operations_client(self) -> operations_v1.OperationsClient:
client.
"""
# Sanity check: Only create a new client if we do not already have one.
if "operations_client" not in self.__dict__:
self.__dict__["operations_client"] = operations_v1.OperationsClient(
self.grpc_channel
)
if self._operations_client is None:
self._operations_client = operations_v1.OperationsClient(self.grpc_channel)

# Return the client from cache.
return self.__dict__["operations_client"]
return self._operations_client

@property
def create_cluster(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -212,6 +216,10 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

# Run the base constructor.
Expand All @@ -225,6 +233,7 @@ def __init__(
)

self._stubs = {}
self._operations_client = None

@property
def grpc_channel(self) -> aio.Channel:
Expand All @@ -244,13 +253,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient:
client.
"""
# Sanity check: Only create a new client if we do not already have one.
if "operations_client" not in self.__dict__:
self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient(
if self._operations_client is None:
self._operations_client = operations_v1.OperationsAsyncClient(
self.grpc_channel
)

# Return the client from cache.
return self.__dict__["operations_client"]
return self._operations_client

@property
def create_cluster(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
_transport_registry["grpc"] = JobControllerGrpcTransport
_transport_registry["grpc_asyncio"] = JobControllerGrpcAsyncIOTransport


__all__ = (
"JobControllerTransport",
"JobControllerGrpcTransport",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -167,9 +171,14 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

self._stubs = {} # type: Dict[str, Callable]
self._operations_client = None

# Run the base constructor.
super().__init__(
Expand All @@ -193,7 +202,7 @@ def create_channel(
) -> grpc.Channel:
"""Create and return a gRPC channel object.
Args:
address (Optionsl[str]): The host for the channel to use.
address (Optional[str]): The host for the channel to use.
credentials (Optional[~.Credentials]): The
authorization credentials to attach to requests. These
credentials identify this application to the service. If
Expand Down Expand Up @@ -240,13 +249,11 @@ def operations_client(self) -> operations_v1.OperationsClient:
client.
"""
# Sanity check: Only create a new client if we do not already have one.
if "operations_client" not in self.__dict__:
self.__dict__["operations_client"] = operations_v1.OperationsClient(
self.grpc_channel
)
if self._operations_client is None:
self._operations_client = operations_v1.OperationsClient(self.grpc_channel)

# Return the client from cache.
return self.__dict__["operations_client"]
return self._operations_client

@property
def submit_job(self) -> Callable[[jobs.SubmitJobRequest], jobs.Job]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -212,6 +216,10 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

# Run the base constructor.
Expand All @@ -225,6 +233,7 @@ def __init__(
)

self._stubs = {}
self._operations_client = None

@property
def grpc_channel(self) -> aio.Channel:
Expand All @@ -244,13 +253,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient:
client.
"""
# Sanity check: Only create a new client if we do not already have one.
if "operations_client" not in self.__dict__:
self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient(
if self._operations_client is None:
self._operations_client = operations_v1.OperationsAsyncClient(
self.grpc_channel
)

# Return the client from cache.
return self.__dict__["operations_client"]
return self._operations_client

@property
def submit_job(self) -> Callable[[jobs.SubmitJobRequest], Awaitable[jobs.Job]]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
_transport_registry["grpc"] = WorkflowTemplateServiceGrpcTransport
_transport_registry["grpc_asyncio"] = WorkflowTemplateServiceGrpcAsyncIOTransport


__all__ = (
"WorkflowTemplateServiceTransport",
"WorkflowTemplateServiceGrpcTransport",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -168,9 +172,14 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

self._stubs = {} # type: Dict[str, Callable]
self._operations_client = None

# Run the base constructor.
super().__init__(
Expand All @@ -194,7 +203,7 @@ def create_channel(
) -> grpc.Channel:
"""Create and return a gRPC channel object.
Args:
address (Optionsl[str]): The host for the channel to use.
address (Optional[str]): The host for the channel to use.
credentials (Optional[~.Credentials]): The
authorization credentials to attach to requests. These
credentials identify this application to the service. If
Expand Down Expand Up @@ -241,13 +250,11 @@ def operations_client(self) -> operations_v1.OperationsClient:
client.
"""
# Sanity check: Only create a new client if we do not already have one.
if "operations_client" not in self.__dict__:
self.__dict__["operations_client"] = operations_v1.OperationsClient(
self.grpc_channel
)
if self._operations_client is None:
self._operations_client = operations_v1.OperationsClient(self.grpc_channel)

# Return the client from cache.
return self.__dict__["operations_client"]
return self._operations_client

@property
def create_workflow_template(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ def __init__(
ssl_credentials=ssl_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
self._ssl_channel_credentials = ssl_credentials
else:
Expand All @@ -213,6 +217,10 @@ def __init__(
ssl_credentials=ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)

# Run the base constructor.
Expand All @@ -226,6 +234,7 @@ def __init__(
)

self._stubs = {}
self._operations_client = None

@property
def grpc_channel(self) -> aio.Channel:
Expand All @@ -245,13 +254,13 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient:
client.
"""
# Sanity check: Only create a new client if we do not already have one.
if "operations_client" not in self.__dict__:
self.__dict__["operations_client"] = operations_v1.OperationsAsyncClient(
if self._operations_client is None:
self._operations_client = operations_v1.OperationsAsyncClient(
self.grpc_channel
)

# Return the client from cache.
return self.__dict__["operations_client"]
return self._operations_client

@property
def create_workflow_template(
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dataproc_v1/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
DeleteWorkflowTemplateRequest,
)


__all__ = (
"AutoscalingPolicy",
"BasicAutoscalingAlgorithm",
Expand All @@ -121,6 +120,7 @@
"DeleteAutoscalingPolicyRequest",
"ListAutoscalingPoliciesRequest",
"ListAutoscalingPoliciesResponse",
"Component",
"Cluster",
"ClusterConfig",
"EndpointConfig",
Expand Down
Loading

0 comments on commit 6f27109

Please sign in to comment.