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

Commit

Permalink
fix: remove client recv msg limit and add enums to types/__init__.py (
Browse files Browse the repository at this point in the history
#22)

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
  • Loading branch information
yoshi-automation committed Dec 28, 2020
1 parent 9bd3477 commit b3dc882
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
Expand Up @@ -30,7 +30,6 @@
_transport_registry["grpc"] = AlphaAnalyticsDataGrpcTransport
_transport_registry["grpc_asyncio"] = AlphaAnalyticsDataGrpcAsyncIOTransport


__all__ = (
"AlphaAnalyticsDataTransport",
"AlphaAnalyticsDataGrpcTransport",
Expand Down
Expand Up @@ -146,6 +146,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 @@ -164,6 +168,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 @@ -190,7 +198,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 @@ -191,6 +191,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 @@ -209,6 +213,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
5 changes: 4 additions & 1 deletion google/analytics/data_v1alpha/types/__init__.py
Expand Up @@ -43,6 +43,8 @@
QuotaStatus,
DimensionMetadata,
MetricMetadata,
MetricAggregation,
MetricType,
)
from .analytics_data_api import (
Metadata,
Expand All @@ -59,7 +61,6 @@
RunRealtimeReportResponse,
)


__all__ = (
"DateRange",
"Entity",
Expand Down Expand Up @@ -88,6 +89,8 @@
"QuotaStatus",
"DimensionMetadata",
"MetricMetadata",
"MetricAggregation",
"MetricType",
"Metadata",
"RunReportRequest",
"RunReportResponse",
Expand Down
6 changes: 3 additions & 3 deletions synth.metadata
Expand Up @@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/python-analytics-data.git",
"sha": "27e59e536c91031f694beba2a99aa13b3ea36ee9"
"sha": "9bd347737319ea5cae0cf6556d55cd8397a06811"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "e67686cf0afd279ebd99af891f7ffd792cce8152",
"internalRef": "345553480"
"sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907",
"internalRef": "347055288"
}
},
{
Expand Down
8 changes: 8 additions & 0 deletions tests/unit/gapic/data_v1alpha/test_alpha_analytics_data.py
Expand Up @@ -1338,6 +1338,10 @@ def test_alpha_analytics_data_transport_channel_mtls_with_client_cert_source(
),
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 @@ -1382,6 +1386,10 @@ def test_alpha_analytics_data_transport_channel_mtls_with_adc(transport_class):
),
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

0 comments on commit b3dc882

Please sign in to comment.