googleapis / gax-ruby

Google API Extensions for Ruby
https://rubygems.org/gems/google-gax
BSD 3-Clause "New" or "Revised" License
20 stars 22 forks source link

Reimplement retry with incremental backoff #172

Closed blowmage closed 5 years ago

blowmage commented 5 years ago

This implements the simplified retry mechanics. It splits apart the old RetryOptions object and places retry_codes and retry_settings directly on CallOptions. This was done to allow users to configure only the settings they want to change, without having to specify all settings.

RetrySettings is a replacement for BackoffSettings. It provides a simpler set of values to configure the incremental backoff. It also allows users to only specify the values they want to change, not every value.

CallOptions#kwargs has been removed.

[refs #150, fixes #163, refs #165]

codecov[bot] commented 5 years ago

Codecov Report

Merging #172 into master will decrease coverage by 0.6%. The diff coverage is 89.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
- Coverage   98.28%   97.67%   -0.61%     
==========================================
  Files          18       22       +4     
  Lines        1165     1292     +127     
==========================================
+ Hits         1145     1262     +117     
- Misses         20       30      +10
Impacted Files Coverage Δ
test/google/gax/paged_enumerable/enum_test.rb 100% <ø> (ø) :arrow_up:
test/google/gax/util_test.rb 100% <ø> (ø) :arrow_up:
test/google/gax/operation_test.rb 100% <ø> (ø) :arrow_up:
...oogle/gax/paged_enumerable/invalid_request_test.rb 100% <ø> (ø) :arrow_up:
lib/google/gax/settings.rb 100% <ø> (ø) :arrow_up:
test/google/gax/error_test.rb 100% <ø> (ø) :arrow_up:
...ogle/gax/paged_enumerable/invalid_response_test.rb 79.48% <ø> (-1.47%) :arrow_down:
...ax/paged_enumerable/valid_request_response_test.rb 100% <ø> (ø) :arrow_up:
lib/google/gax/errors.rb 100% <100%> (ø) :arrow_up:
test/google/gax/api_callable_test.rb 97.53% <100%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 64712da...85ac77e. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #172 into master will decrease coverage by 0.6%. The diff coverage is 89.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
- Coverage   98.28%   97.67%   -0.61%     
==========================================
  Files          18       22       +4     
  Lines        1165     1292     +127     
==========================================
+ Hits         1145     1262     +117     
- Misses         20       30      +10
Impacted Files Coverage Δ
test/google/gax/paged_enumerable/enum_test.rb 100% <ø> (ø) :arrow_up:
test/google/gax/util_test.rb 100% <ø> (ø) :arrow_up:
test/google/gax/operation_test.rb 100% <ø> (ø) :arrow_up:
...oogle/gax/paged_enumerable/invalid_request_test.rb 100% <ø> (ø) :arrow_up:
lib/google/gax/settings.rb 100% <ø> (ø) :arrow_up:
test/google/gax/error_test.rb 100% <ø> (ø) :arrow_up:
...ogle/gax/paged_enumerable/invalid_response_test.rb 79.48% <ø> (-1.47%) :arrow_down:
...ax/paged_enumerable/valid_request_response_test.rb 100% <ø> (ø) :arrow_up:
lib/google/gax/errors.rb 100% <100%> (ø) :arrow_up:
test/google/gax/api_callable_test.rb 97.53% <100%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 64712da...552d8a5. Read the comment docs.

codecov-io commented 5 years ago

Codecov Report

Merging #172 into master will decrease coverage by 57.2%. The diff coverage is 33.89%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #172       +/-   ##
===========================================
- Coverage   98.28%   41.08%   -57.21%     
===========================================
  Files          18        6       -12     
  Lines        1165      185      -980     
===========================================
- Hits         1145       76     -1069     
- Misses         20      109       +89
Impacted Files Coverage Δ
lib/google/gax/errors.rb 64% <0%> (-36%) :arrow_down:
lib/google/gax.rb 20% <100%> (-80%) :arrow_down:
lib/google/gax/api_callable.rb 25.92% <20%> (-70.08%) :arrow_down:
lib/google/gax/retry_settings.rb 30.76% <30.76%> (ø)
lib/google/gax/retry_manager.rb 42.85% <42.85%> (ø)
lib/google/gax/grpc.rb 35.29% <0%> (-58.83%) :arrow_down:
lib/google/gax/operation.rb
test/google/gax/grpc_test.rb
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 64712da...7468064. Read the comment docs.

codecov-io commented 5 years ago

Codecov Report

Merging #172 into master will increase coverage by 0.27%. The diff coverage is 99.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
+ Coverage   98.28%   98.55%   +0.27%     
==========================================
  Files          18       25       +7     
  Lines        1165     1452     +287     
==========================================
+ Hits         1145     1431     +286     
- Misses         20       21       +1
Impacted Files Coverage Δ
lib/google/gax/operation.rb 100% <ø> (ø) :arrow_up:
test/google/gax/util_test.rb 100% <ø> (ø) :arrow_up:
lib/google/gax/grpc.rb 94.11% <ø> (ø) :arrow_up:
test/google/gax/error_test.rb 100% <ø> (ø) :arrow_up:
test/google/gax/paged_enumerable/enum_test.rb 100% <ø> (ø) :arrow_up:
lib/google/gax/settings.rb 100% <ø> (ø) :arrow_up:
...ogle/gax/paged_enumerable/invalid_response_test.rb 79.48% <ø> (-1.47%) :arrow_down:
test/google/gax/operation_test.rb 100% <ø> (ø) :arrow_up:
...oogle/gax/paged_enumerable/invalid_request_test.rb 100% <ø> (ø) :arrow_up:
...ax/paged_enumerable/valid_request_response_test.rb 100% <ø> (ø) :arrow_up:
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 64712da...d9f381f. Read the comment docs.