Skip to content
Draft
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
2 changes: 1 addition & 1 deletion packages/google-cloud-compute-v1beta/.repo-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"name": "google-cloud-compute-v1beta",
"name_pretty": "Compute Engine",
"product_documentation": "https://cloud.google.com/compute/",
"release_level": "stable",
"release_level": "preview",
"repo": "googleapis/google-cloud-python"
}
4 changes: 2 additions & 2 deletions packages/google-cloud-compute-v1beta/README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Python Client for Compute Engine
================================

|stable| |pypi| |versions|
|preview| |pypi| |versions|

`Compute Engine`_: delivers virtual machines running in Google's innovative data centers and worldwide fiber network. Compute Engine's tooling and workflow support enable scaling from single instances to global, load-balanced cloud computing. Compute Engine's VMs boot quickly, come with persistent disk storage, deliver consistent performance and are available in many configurations.

- `Client Library Documentation`_
- `Product Documentation`_

.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
.. |preview| image:: https://img.shields.io/badge/support-preview-orange.svg
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-compute-v1beta.svg
:target: https://pypi.org/project/google-cloud-compute-v1beta/
Expand Down
4 changes: 2 additions & 2 deletions packages/google-cloud-compute-v1beta/docs/README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Python Client for Compute Engine
================================

|stable| |pypi| |versions|
|preview| |pypi| |versions|

`Compute Engine`_: delivers virtual machines running in Google's innovative data centers and worldwide fiber network. Compute Engine's tooling and workflow support enable scaling from single instances to global, load-balanced cloud computing. Compute Engine's VMs boot quickly, come with persistent disk storage, deliver consistent performance and are available in many configurations.

- `Client Library Documentation`_
- `Product Documentation`_

.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
.. |preview| image:: https://img.shields.io/badge/support-preview-orange.svg
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-compute-v1beta.svg
:target: https://pypi.org/project/google-cloud-compute-v1beta/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,47 @@ def _prep_wrapped_messages(self, client_info):
self._wrapped_methods = {
self.aggregated_list: gapic_v1.method.wrap_method(
self.aggregated_list,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
Comment on lines +151 to +161
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The default_retry configuration includes core_exceptions.DeadlineExceeded in its predicate, but the deadline (total timeout) is set to 600.0, which is identical to the default_timeout (per-attempt timeout). This configuration effectively prevents retries on timeouts because the first attempt that hits the 600s limit will also reach the total retry deadline. To make retrying on DeadlineExceeded effective, the deadline should be greater than the default_timeout, or the default_timeout should be reduced.

client_info=client_info,
),
self.get: gapic_v1.method.wrap_method(
self.get,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
),
self.list: gapic_v1.method.wrap_method(
self.list,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,42 +149,72 @@ def _prep_wrapped_messages(self, client_info):
self._wrapped_methods = {
self.aggregated_list: gapic_v1.method.wrap_method(
self.aggregated_list,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
),
self.delete: gapic_v1.method.wrap_method(
self.delete,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
self.get: gapic_v1.method.wrap_method(
self.get,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
),
self.insert: gapic_v1.method.wrap_method(
self.insert,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
self.list: gapic_v1.method.wrap_method(
self.list,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
),
self.move: gapic_v1.method.wrap_method(
self.move,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
self.set_labels: gapic_v1.method.wrap_method(
self.set_labels,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
self.test_iam_permissions: gapic_v1.method.wrap_method(
self.test_iam_permissions,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def _prep_wrapped_messages(self, client_info):
self._wrapped_methods = {
self.calendar_mode: gapic_v1.method.wrap_method(
self.calendar_mode,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,42 +149,72 @@ def _prep_wrapped_messages(self, client_info):
self._wrapped_methods = {
self.aggregated_list: gapic_v1.method.wrap_method(
self.aggregated_list,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
),
self.delete: gapic_v1.method.wrap_method(
self.delete,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
self.get: gapic_v1.method.wrap_method(
self.get,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
),
self.insert: gapic_v1.method.wrap_method(
self.insert,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
self.list: gapic_v1.method.wrap_method(
self.list,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.DeadlineExceeded,
core_exceptions.ServiceUnavailable,
),
deadline=600.0,
),
default_timeout=600.0,
client_info=client_info,
),
self.patch: gapic_v1.method.wrap_method(
self.patch,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
self.test_iam_permissions: gapic_v1.method.wrap_method(
self.test_iam_permissions,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
self.update: gapic_v1.method.wrap_method(
self.update,
default_timeout=None,
default_timeout=600.0,
client_info=client_info,
),
}
Expand Down
Loading
Loading