Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

fix: remove client recv msg limit fix: add enums to types/__init__.py #56

Merged
merged 3 commits into from
Dec 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
_transport_registry["grpc"] = CloudTasksGrpcTransport
_transport_registry["grpc_asyncio"] = CloudTasksGrpcAsyncIOTransport


__all__ = (
"CloudTasksTransport",
"CloudTasksGrpcTransport",
Expand Down
10 changes: 9 additions & 1 deletion google/cloud/tasks_v2/services/cloud_tasks/transports/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,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 @@ -172,6 +176,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 @@ -198,7 +206,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 @@ -199,6 +199,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 @@ -217,6 +221,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
3 changes: 2 additions & 1 deletion google/cloud/tasks_v2/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
AppEngineRouting,
OAuthToken,
OidcToken,
HttpMethod,
)
from .queue import (
Queue,
Expand Down Expand Up @@ -50,13 +51,13 @@
RunTaskRequest,
)


__all__ = (
"HttpRequest",
"AppEngineHttpRequest",
"AppEngineRouting",
"OAuthToken",
"OidcToken",
"HttpMethod",
"Queue",
"RateLimits",
"RetryConfig",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
_transport_registry["grpc"] = CloudTasksGrpcTransport
_transport_registry["grpc_asyncio"] = CloudTasksGrpcAsyncIOTransport


__all__ = (
"CloudTasksTransport",
"CloudTasksGrpcTransport",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,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 @@ -172,6 +176,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 @@ -198,7 +206,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 @@ -199,6 +199,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 @@ -217,6 +221,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
3 changes: 2 additions & 1 deletion google/cloud/tasks_v2beta2/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
AppEngineHttpTarget,
AppEngineHttpRequest,
AppEngineRouting,
HttpMethod,
)
from .queue import (
Queue,
Expand Down Expand Up @@ -55,13 +56,13 @@
RunTaskRequest,
)


__all__ = (
"PullTarget",
"PullMessage",
"AppEngineHttpTarget",
"AppEngineHttpRequest",
"AppEngineRouting",
"HttpMethod",
"Queue",
"RateLimits",
"RetryConfig",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
_transport_registry["grpc"] = CloudTasksGrpcTransport
_transport_registry["grpc_asyncio"] = CloudTasksGrpcAsyncIOTransport


__all__ = (
"CloudTasksTransport",
"CloudTasksGrpcTransport",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,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 @@ -172,6 +176,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 @@ -198,7 +206,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 @@ -199,6 +199,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 @@ -217,6 +221,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
3 changes: 2 additions & 1 deletion google/cloud/tasks_v2beta3/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
AppEngineRouting,
OAuthToken,
OidcToken,
HttpMethod,
)
from .queue import (
Queue,
Expand Down Expand Up @@ -51,14 +52,14 @@
RunTaskRequest,
)


__all__ = (
"HttpRequest",
"AppEngineHttpQueue",
"AppEngineHttpRequest",
"AppEngineRouting",
"OAuthToken",
"OidcToken",
"HttpMethod",
"Queue",
"RateLimits",
"RetryConfig",
Expand Down
4 changes: 2 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "160f80d81d9b75145a2b50877cdb4b6e084a78c0",
"internalRef": "346227314"
"sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907",
"internalRef": "347055288"
}
},
{
Expand Down
8 changes: 8 additions & 0 deletions tests/unit/gapic/tasks_v2/test_cloud_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4128,6 +4128,10 @@ def test_cloud_tasks_transport_channel_mtls_with_client_cert_source(transport_cl
scopes=("https://www.googleapis.com/auth/cloud-platform",),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel
assert transport._ssl_channel_credentials == mock_ssl_cred
Expand Down Expand Up @@ -4166,6 +4170,10 @@ def test_cloud_tasks_transport_channel_mtls_with_adc(transport_class):
scopes=("https://www.googleapis.com/auth/cloud-platform",),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel

Expand Down
8 changes: 8 additions & 0 deletions tests/unit/gapic/tasks_v2beta2/test_cloud_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4962,6 +4962,10 @@ def test_cloud_tasks_transport_channel_mtls_with_client_cert_source(transport_cl
scopes=("https://www.googleapis.com/auth/cloud-platform",),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel
assert transport._ssl_channel_credentials == mock_ssl_cred
Expand Down Expand Up @@ -5000,6 +5004,10 @@ def test_cloud_tasks_transport_channel_mtls_with_adc(transport_class):
scopes=("https://www.googleapis.com/auth/cloud-platform",),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel

Expand Down
8 changes: 8 additions & 0 deletions tests/unit/gapic/tasks_v2beta3/test_cloud_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4218,6 +4218,10 @@ def test_cloud_tasks_transport_channel_mtls_with_client_cert_source(transport_cl
scopes=("https://www.googleapis.com/auth/cloud-platform",),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel
assert transport._ssl_channel_credentials == mock_ssl_cred
Expand Down Expand Up @@ -4256,6 +4260,10 @@ def test_cloud_tasks_transport_channel_mtls_with_adc(transport_class):
scopes=("https://www.googleapis.com/auth/cloud-platform",),
ssl_credentials=mock_ssl_cred,
quota_project_id=None,
options=[
("grpc.max_send_message_length", -1),
("grpc.max_receive_message_length", -1),
],
)
assert transport.grpc_channel == mock_grpc_channel

Expand Down