Skip to content

Commit 4f7fe85

Browse files
fix: update generated retry timings for publish and pull rpcs via synth (#43)
* fix: update generated retry settings for pull and publish rpcs via synth Co-authored-by: Alex Hong <hongalex@google.com> Co-authored-by: Alex Hong <9397363+hongalex@users.noreply.github.com>
1 parent 6242018 commit 4f7fe85

File tree

9 files changed

+667
-429
lines changed

9 files changed

+667
-429
lines changed

google/cloud/pubsub_v1/gapic/publisher_client.py

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,12 @@ def create_topic(
260260
>>> response = client.create_topic(name)
261261
262262
Args:
263-
name (str): The name of the topic. It must have the format
264-
`"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
265-
and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
266-
underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
267-
signs (`%`). It must be between 3 and 255 characters in length, and it
268-
must not start with `"goog"`.
263+
name (str): Required. The name of the topic. It must have the format
264+
``"projects/{project}/topics/{topic}"``. ``{topic}`` must start with a
265+
letter, and contain only letters (``[A-Za-z]``), numbers (``[0-9]``),
266+
dashes (``-``), underscores (``_``), periods (``.``), tildes (``~``),
267+
plus (``+``) or percent signs (``%``). It must be between 3 and 255
268+
characters in length, and it must not start with ``"goog"``.
269269
labels (dict[str -> str]): See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
270270
managing labels</a>.
271271
message_storage_policy (Union[dict, ~google.cloud.pubsub_v1.types.MessageStoragePolicy]): Policy constraining the set of Google Cloud Platform regions where messages
@@ -358,12 +358,12 @@ def update_topic(
358358
>>> response = client.update_topic(topic, update_mask)
359359
360360
Args:
361-
topic (Union[dict, ~google.cloud.pubsub_v1.types.Topic]): The updated topic object.
361+
topic (Union[dict, ~google.cloud.pubsub_v1.types.Topic]): Required. The updated topic object.
362362
363363
If a dict is provided, it must be of the same form as the protobuf
364364
message :class:`~google.cloud.pubsub_v1.types.Topic`
365-
update_mask (Union[dict, ~google.cloud.pubsub_v1.types.FieldMask]): Indicates which fields in the provided topic to update. Must be
366-
specified and non-empty. Note that if ``update_mask`` contains
365+
update_mask (Union[dict, ~google.cloud.pubsub_v1.types.FieldMask]): Required. Indicates which fields in the provided topic to update. Must
366+
be specified and non-empty. Note that if ``update_mask`` contains
367367
"message\_storage\_policy" then the new value will be determined based
368368
on the policy configured at the project or organization level. The
369369
``message_storage_policy`` must not be set in the ``topic`` provided
@@ -444,9 +444,9 @@ def publish(
444444
>>> response = client.publish(topic, messages)
445445
446446
Args:
447-
topic (str): The messages in the request will be published on this topic. Format is
448-
``projects/{project}/topics/{topic}``.
449-
messages (list[Union[dict, ~google.cloud.pubsub_v1.types.PubsubMessage]]): The messages to publish.
447+
topic (str): Required. The messages in the request will be published on this topic.
448+
Format is ``projects/{project}/topics/{topic}``.
449+
messages (list[Union[dict, ~google.cloud.pubsub_v1.types.PubsubMessage]]): Required. The messages to publish.
450450
451451
If a dict is provided, it must be of the same form as the protobuf
452452
message :class:`~google.cloud.pubsub_v1.types.PubsubMessage`
@@ -518,7 +518,7 @@ def get_topic(
518518
>>> response = client.get_topic(topic)
519519
520520
Args:
521-
topic (str): The name of the topic to get. Format is
521+
topic (str): Required. The name of the topic to get. Format is
522522
``projects/{project}/topics/{topic}``.
523523
retry (Optional[google.api_core.retry.Retry]): A retry object used
524524
to retry requests. If ``None`` is specified, requests will
@@ -601,7 +601,7 @@ def list_topics(
601601
... pass
602602
603603
Args:
604-
project (str): The name of the project in which to list topics. Format is
604+
project (str): Required. The name of the project in which to list topics. Format is
605605
``projects/{project-id}``.
606606
page_size (int): The maximum number of resources contained in the
607607
underlying API response. If page streaming is performed per-
@@ -703,8 +703,8 @@ def list_topic_subscriptions(
703703
... pass
704704
705705
Args:
706-
topic (str): The name of the topic that subscriptions are attached to. Format is
707-
``projects/{project}/topics/{topic}``.
706+
topic (str): Required. The name of the topic that subscriptions are attached to.
707+
Format is ``projects/{project}/topics/{topic}``.
708708
page_size (int): The maximum number of resources contained in the
709709
underlying API response. If page streaming is performed per-
710710
resource, this parameter does not affect the return value. If page
@@ -799,7 +799,7 @@ def delete_topic(
799799
>>> client.delete_topic(topic)
800800
801801
Args:
802-
topic (str): Name of the topic to delete. Format is
802+
topic (str): Required. Name of the topic to delete. Format is
803803
``projects/{project}/topics/{topic}``.
804804
retry (Optional[google.api_core.retry.Retry]): A retry object used
805805
to retry requests. If ``None`` is specified, requests will
@@ -855,8 +855,11 @@ def set_iam_policy(
855855
metadata=None,
856856
):
857857
"""
858-
Sets the access control policy on the specified resource. Replaces any
859-
existing policy.
858+
Sets the access control policy on the specified resource. Replaces
859+
any existing policy.
860+
861+
Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and
862+
PERMISSION_DENIED
860863
861864
Example:
862865
>>> from google.cloud import pubsub_v1
@@ -937,9 +940,8 @@ def get_iam_policy(
937940
metadata=None,
938941
):
939942
"""
940-
Gets the access control policy for a resource.
941-
Returns an empty policy if the resource exists and does not have a policy
942-
set.
943+
Gets the access control policy for a resource. Returns an empty policy
944+
if the resource exists and does not have a policy set.
943945
944946
Example:
945947
>>> from google.cloud import pubsub_v1
@@ -1018,8 +1020,8 @@ def test_iam_permissions(
10181020
):
10191021
"""
10201022
Returns permissions that a caller has on the specified resource. If the
1021-
resource does not exist, this will return an empty set of permissions,
1022-
not a NOT\_FOUND error.
1023+
resource does not exist, this will return an empty set of
1024+
permissions, not a NOT_FOUND error.
10231025
10241026
Note: This operation is designed to be used for building
10251027
permission-aware UIs and command-line tools, not for authorization

google/cloud/pubsub_v1/gapic/publisher_client_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"retry_params_name": "default",
4848
},
4949
"Publish": {
50-
"timeout_millis": 60000,
50+
"timeout_millis": 20000,
5151
"retry_codes_name": "publish",
5252
"retry_params_name": "messaging",
5353
"bundling": {

0 commit comments

Comments
 (0)