Skip to content

Commit fe2f7f0

Browse files
feat: add retry jitter configuration (#1256)
* feat: Add jitter parameter to RetryPolicy documentation Updates the client configuration templates to document the `:jitter` parameter in the `retry_policy` configuration. This aligns the generated documentation with the new jitter capability in `gapic-common`.
1 parent 68246ab commit fe2f7f0

File tree

93 files changed

+205
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+205
-14
lines changed

gapic-generator-cloud/templates/cloud/wrapper_gem/_main.text.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ end
145145
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
146146
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
147147
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
148+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
148149
# * `:retry_codes` (*type:* `Array<String>`) -
149150
# The error codes that should trigger a retry.
150151
#

gapic-generator/lib/gapic/presenters/gem_presenter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def extra_files
256256

257257
def dependencies
258258
@dependencies ||= begin
259-
deps = { "gapic-common" => "~> 1.2" }
259+
deps = { "gapic-common" => "~> 1.3" }
260260
deps["grpc-google-iam-v1"] = "~> 1.11" if iam_dependency?
261261
extra_deps = gem_config_dependencies
262262
deps.merge! mixins_model.dependencies if mixins_model.mixins?

gapic-generator/templates/default/service/client/_config.text.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
9999
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
100100
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
101+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
101102
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
102103
# trigger a retry.
103104
# @return [::Hash]
@@ -181,6 +182,7 @@ class Configuration
181182
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
182183
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
183184
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
185+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
184186
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
185187
# trigger a retry.
186188
#

gapic-generator/templates/default/service/rest/client/_config.text.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
7373
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
7474
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
75+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
7576
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
7677
# trigger a retry.
7778
# @return [::Hash]
@@ -153,6 +154,7 @@ class Configuration
153154
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
154155
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
155156
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
157+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
156158
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
157159
# trigger a retry.
158160
#

shared/output/ads/googleads/lib/google/ads/google_ads/v19/services/campaign_service/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ def enable_p_max_brand_guidelines request, options = nil
511511
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
512512
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
513513
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
514+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
514515
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
515516
# trigger a retry.
516517
# @return [::Hash]
@@ -595,6 +596,7 @@ def channel_pool
595596
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
596597
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
597598
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
599+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
598600
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
599601
# trigger a retry.
600602
#

shared/output/cloud/compute_small/lib/google/cloud/compute/v1/addresses/rest/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ def list request, options = nil
741741
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
742742
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
743743
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
744+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
744745
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
745746
# trigger a retry.
746747
# @return [::Hash]
@@ -813,6 +814,7 @@ def rpcs
813814
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
814815
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
815816
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
817+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
816818
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
817819
# trigger a retry.
818820
#

shared/output/cloud/compute_small/lib/google/cloud/compute/v1/global_operations/rest/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ def get request, options = nil
404404
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
405405
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
406406
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
407+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
407408
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
408409
# trigger a retry.
409410
# @return [::Hash]
@@ -476,6 +477,7 @@ def rpcs
476477
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
477478
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
478479
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
480+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
479481
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
480482
# trigger a retry.
481483
#

shared/output/cloud/compute_small/lib/google/cloud/compute/v1/networks/rest/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ def remove_peering request, options = nil
464464
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
465465
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
466466
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
467+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
467468
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
468469
# trigger a retry.
469470
# @return [::Hash]
@@ -536,6 +537,7 @@ def rpcs
536537
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
537538
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
538539
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
540+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
539541
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
540542
# trigger a retry.
541543
#

shared/output/cloud/compute_small/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ def resize request, options = nil
363363
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
364364
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
365365
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
366+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
366367
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
367368
# trigger a retry.
368369
# @return [::Hash]
@@ -435,6 +436,7 @@ def rpcs
435436
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
436437
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
437438
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
439+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
438440
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
439441
# trigger a retry.
440442
#

shared/output/cloud/compute_small/lib/google/cloud/compute/v1/region_operations/rest/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ def wait request, options = nil
596596
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
597597
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
598598
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
599+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
599600
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
600601
# trigger a retry.
601602
# @return [::Hash]
@@ -668,6 +669,7 @@ def rpcs
668669
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
669670
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
670671
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
672+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
671673
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
672674
# trigger a retry.
673675
#

0 commit comments

Comments
 (0)