From 199831202a72103548b6d58a723cc38a3c8b04a9 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 6 Aug 2019 15:38:26 -0400 Subject: [PATCH] Remove send/recv msg size limit (via synth). (#8981) Closes #8956. --- .../grafeas_v1/gapic/grafeas_client.py | 56 +++++++++---------- .../transports/grafeas_grpc_transport.py | 10 +++- packages/grafeas/synth.metadata | 9 ++- packages/grafeas/synth.py | 2 - 4 files changed, 41 insertions(+), 36 deletions(-) diff --git a/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py b/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py index 0dec93828e5c..a7e3c6d31713 100644 --- a/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py +++ b/packages/grafeas/grafeas/grafeas_v1/gapic/grafeas_client.py @@ -173,8 +173,8 @@ def get_occurrence( name (str): The name of the occurrence in the form of ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -267,8 +267,8 @@ def list_occurrences( streaming is performed per-page, this determines the maximum number of resources in a page. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -359,8 +359,8 @@ def delete_occurrence( name (str): The name of the occurrence in the form of ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -438,8 +438,8 @@ def create_occurrence( If a dict is provided, it must be of the same form as the protobuf message :class:`~grafeas.grafeas_v1.types.Occurrence` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -522,8 +522,8 @@ def batch_create_occurrences( If a dict is provided, it must be of the same form as the protobuf message :class:`~grafeas.grafeas_v1.types.Occurrence` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -611,8 +611,8 @@ def update_occurrence( If a dict is provided, it must be of the same form as the protobuf message :class:`~grafeas.grafeas_v1.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -688,8 +688,8 @@ def get_occurrence_note( name (str): The name of the occurrence in the form of ``projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -762,8 +762,8 @@ def get_note( name (str): The name of the note in the form of ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -856,8 +856,8 @@ def list_notes( streaming is performed per-page, this determines the maximum number of resources in a page. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -946,8 +946,8 @@ def delete_note( name (str): The name of the note in the form of ``projects/[PROVIDER_ID]/notes/[NOTE_ID]``. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1030,8 +1030,8 @@ def create_note( If a dict is provided, it must be of the same form as the protobuf message :class:`~grafeas.grafeas_v1.types.Note` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1114,8 +1114,8 @@ def batch_create_notes( If a dict is provided, it must be of the same form as the protobuf message :class:`~grafeas.grafeas_v1.types.Note` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1201,8 +1201,8 @@ def update_note( If a dict is provided, it must be of the same form as the protobuf message :class:`~grafeas.grafeas_v1.types.FieldMask` retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. @@ -1299,8 +1299,8 @@ def list_note_occurrences( streaming is performed per-page, this determines the maximum number of resources in a page. retry (Optional[google.api_core.retry.Retry]): A retry object used - to retry requests. If ``None`` is specified, requests will not - be retried. + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. timeout (Optional[float]): The amount of time, in seconds, to wait for the request to complete. Note that if ``retry`` is specified, the timeout applies to each individual attempt. diff --git a/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py b/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py index bb058aca3b11..2e438b464d3d 100644 --- a/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py +++ b/packages/grafeas/grafeas/grafeas_v1/gapic/transports/grafeas_grpc_transport.py @@ -54,7 +54,15 @@ def __init__(self, address, scopes, channel=None, credentials=None): # Create the channel. if channel is None: - channel = self.create_channel(address, scopes, credentials=credentials) + channel = self.create_channel( + address, + scopes, + credentials=credentials, + options={ + "grpc.max_send_message_length": -1, + "grpc.max_receive_message_length": -1, + }.items(), + ) self._channel = channel diff --git a/packages/grafeas/synth.metadata b/packages/grafeas/synth.metadata index a5424e8035f2..0c0938c03e84 100644 --- a/packages/grafeas/synth.metadata +++ b/packages/grafeas/synth.metadata @@ -1,19 +1,18 @@ { - "updateTime": "2019-07-12T23:41:44.676676Z", + "updateTime": "2019-08-06T18:36:30.465284Z", "sources": [ { "generator": { "name": "artman", - "version": "0.29.4", - "dockerImage": "googleapis/artman@sha256:63f21e83cb92680b7001dc381069e962c9e6dee314fd8365ac554c07c89221fb" + "version": "0.32.1", + "dockerImage": "googleapis/artman@sha256:a684d40ba9a4e15946f5f2ca6b4bd9fe301192f522e9de4fff622118775f309b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "47bd0c2ba33c28dd624a65dad382e02bb61d1618", - "internalRef": "257690259" + "sha": "53e641721f965a485af64331cfea9e5522294d78" } }, { diff --git a/packages/grafeas/synth.py b/packages/grafeas/synth.py index 8995f5751bb0..74bfcd9d64d1 100644 --- a/packages/grafeas/synth.py +++ b/packages/grafeas/synth.py @@ -243,7 +243,6 @@ def from_service_account_file\(cls, filename, \*args, \*\*kwargs\): channel = self\.create_channel\( address=address, credentials=credentials, - \) """, """ # Create the channel. if channel is None: @@ -251,7 +250,6 @@ def from_service_account_file\(cls, filename, \*args, \*\*kwargs\): address, scopes, credentials=credentials, - ) """, )