Skip to content
Permalink
Browse files
fix: remove gRPC send/recv limits; expose client transport (#117)
* 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 committed Dec 29, 2020
1 parent ee093a8 commit 6f27109faf03dd13f25294e57960f0d9e1a9fa27
Showing with 486 additions and 170 deletions.
  1. +0 −1 google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/__init__.py
  2. +9 −1 google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/grpc.py
  3. +8 −0 google/cloud/dataproc_v1/services/autoscaling_policy_service/transports/grpc_asyncio.py
  4. +0 −1 google/cloud/dataproc_v1/services/cluster_controller/transports/__init__.py
  5. +13 −6 google/cloud/dataproc_v1/services/cluster_controller/transports/grpc.py
  6. +12 −3 google/cloud/dataproc_v1/services/cluster_controller/transports/grpc_asyncio.py
  7. +0 −1 google/cloud/dataproc_v1/services/job_controller/transports/__init__.py
  8. +13 −6 google/cloud/dataproc_v1/services/job_controller/transports/grpc.py
  9. +12 −3 google/cloud/dataproc_v1/services/job_controller/transports/grpc_asyncio.py
  10. +0 −1 google/cloud/dataproc_v1/services/workflow_template_service/transports/__init__.py
  11. +13 −6 google/cloud/dataproc_v1/services/workflow_template_service/transports/grpc.py
  12. +12 −3 google/cloud/dataproc_v1/services/workflow_template_service/transports/grpc_asyncio.py
  13. +1 −1 google/cloud/dataproc_v1/types/__init__.py
  14. +108 −63 google/cloud/dataproc_v1beta2/proto/clusters.proto
  15. +0 −1 google/cloud/dataproc_v1beta2/services/autoscaling_policy_service/transports/__init__.py
  16. +9 −1 google/cloud/dataproc_v1beta2/services/autoscaling_policy_service/transports/grpc.py
  17. +8 −0 google/cloud/dataproc_v1beta2/services/autoscaling_policy_service/transports/grpc_asyncio.py
  18. +3 −0 google/cloud/dataproc_v1beta2/services/cluster_controller/async_client.py
  19. +16 −0 google/cloud/dataproc_v1beta2/services/cluster_controller/client.py
  20. +0 −1 google/cloud/dataproc_v1beta2/services/cluster_controller/transports/__init__.py
  21. +13 −6 google/cloud/dataproc_v1beta2/services/cluster_controller/transports/grpc.py
  22. +12 −3 google/cloud/dataproc_v1beta2/services/cluster_controller/transports/grpc_asyncio.py
  23. +0 −1 google/cloud/dataproc_v1beta2/services/job_controller/transports/__init__.py
  24. +13 −6 google/cloud/dataproc_v1beta2/services/job_controller/transports/grpc.py
  25. +12 −3 google/cloud/dataproc_v1beta2/services/job_controller/transports/grpc_asyncio.py
  26. +2 −0 google/cloud/dataproc_v1beta2/services/workflow_template_service/async_client.py
  27. +16 −0 google/cloud/dataproc_v1beta2/services/workflow_template_service/client.py
  28. +0 −1 google/cloud/dataproc_v1beta2/services/workflow_template_service/transports/__init__.py
  29. +13 −6 google/cloud/dataproc_v1beta2/services/workflow_template_service/transports/grpc.py
  30. +12 −3 google/cloud/dataproc_v1beta2/services/workflow_template_service/transports/grpc_asyncio.py
  31. +1 −1 google/cloud/dataproc_v1beta2/types/__init__.py
  32. +8 −8 google/cloud/dataproc_v1beta2/types/clusters.py
  33. +3 −3 synth.metadata
  34. +8 −0 tests/unit/gapic/dataproc_v1/test_autoscaling_policy_service.py
  35. +8 −0 tests/unit/gapic/dataproc_v1/test_cluster_controller.py
  36. +8 −0 tests/unit/gapic/dataproc_v1/test_job_controller.py
  37. +8 −0 tests/unit/gapic/dataproc_v1/test_workflow_template_service.py
  38. +8 −0 tests/unit/gapic/dataproc_v1beta2/test_autoscaling_policy_service.py
  39. +45 −12 tests/unit/gapic/dataproc_v1beta2/test_cluster_controller.py
  40. +8 −0 tests/unit/gapic/dataproc_v1beta2/test_job_controller.py
  41. +51 −18 tests/unit/gapic/dataproc_v1beta2/test_workflow_template_service.py
@@ -30,7 +30,6 @@
_transport_registry["grpc"] = AutoscalingPolicyServiceGrpcTransport
_transport_registry["grpc_asyncio"] = AutoscalingPolicyServiceGrpcAsyncIOTransport


__all__ = (
"AutoscalingPolicyServiceTransport",
"AutoscalingPolicyServiceGrpcTransport",
@@ -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:
@@ -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]
@@ -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
@@ -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:
@@ -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.
@@ -28,7 +28,6 @@
_transport_registry["grpc"] = ClusterControllerGrpcTransport
_transport_registry["grpc_asyncio"] = ClusterControllerGrpcAsyncIOTransport


__all__ = (
"ClusterControllerTransport",
"ClusterControllerGrpcTransport",
@@ -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:
@@ -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__(
@@ -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
@@ -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(
@@ -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:
@@ -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.
@@ -225,6 +233,7 @@ def __init__(
)

self._stubs = {}
self._operations_client = None

@property
def grpc_channel(self) -> aio.Channel:
@@ -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(
@@ -28,7 +28,6 @@
_transport_registry["grpc"] = JobControllerGrpcTransport
_transport_registry["grpc_asyncio"] = JobControllerGrpcAsyncIOTransport


__all__ = (
"JobControllerTransport",
"JobControllerGrpcTransport",
@@ -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:
@@ -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__(
@@ -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
@@ -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]:
@@ -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:
@@ -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.
@@ -225,6 +233,7 @@ def __init__(
)

self._stubs = {}
self._operations_client = None

@property
def grpc_channel(self) -> aio.Channel:
@@ -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]]:
@@ -30,7 +30,6 @@
_transport_registry["grpc"] = WorkflowTemplateServiceGrpcTransport
_transport_registry["grpc_asyncio"] = WorkflowTemplateServiceGrpcAsyncIOTransport


__all__ = (
"WorkflowTemplateServiceTransport",
"WorkflowTemplateServiceGrpcTransport",
@@ -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:
@@ -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__(
@@ -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
@@ -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(
@@ -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:
@@ -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.
@@ -226,6 +234,7 @@ def __init__(
)

self._stubs = {}
self._operations_client = None

@property
def grpc_channel(self) -> aio.Channel:
@@ -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(
@@ -109,7 +109,6 @@
DeleteWorkflowTemplateRequest,
)


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

0 comments on commit 6f27109

Please sign in to comment.