Skip to content

Updated retry policy behavior. #1681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 7, 2020
Merged

Updated retry policy behavior. #1681

merged 2 commits into from
Mar 7, 2020

Conversation

millems
Copy link
Contributor

@millems millems commented Mar 3, 2020

  1. Added support for "retry modes". A retry mode allows configuring multiple SDK parameters at once using default retry profiles, some of which are standardized between AWS SDK languages. See RetryMode javadoc for more information.
  2. Added the ability to configure or disable the default retry throttling behavior of the SDK that 'kicks in' during a large volume of retriable service call errors. This behavior can now be configured via RetryPolicy.retryCapacityCondition.
  3. Fixed an issue where the retry condition returned by RetryPolicy.retryCondition differed from the one specified by RetryPolicy.Builder.retryCondition. The old value can be accessed via the new RetryPolicy.aggregateRetryCondition.
  4. Fixed an issue where specifying your own retry policy would override AWS and service-specific retry conditions. By default, all retry policies now have AWS and service-specific retry conditions added. This can be disabled via the new RetryPolicy.furtherRefinementsAllowed(false).

@codecov-io
Copy link

codecov-io commented Mar 4, 2020

Codecov Report

Merging #1681 into master will decrease coverage by 0.14%.
The diff coverage is 76.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1681      +/-   ##
============================================
- Coverage     75.35%   75.21%   -0.15%     
  Complexity     1446     1446              
============================================
  Files          1057     1065       +8     
  Lines         31517    31703     +186     
  Branches       2427     2441      +14     
============================================
+ Hits          23749    23844      +95     
- Misses         6578     6643      +65     
- Partials       1190     1216      +26
Flag Coverage Δ Complexity Δ
#unittests 75.21% <76.33%> (-0.15%) 1446 <0> (ø)
Impacted Files Coverage Δ Complexity Δ
...a/software/amazon/awssdk/profiles/ProfileFile.java 81.17% <ø> (ø) 0 <0> (ø) ⬇️
...wssdk/core/internal/http/AmazonSyncHttpClient.java 90.56% <ø> (-0.35%) 0 <0> (ø)
...dk/regions/providers/AwsProfileRegionProvider.java 100% <ø> (ø) 0 <0> (ø) ⬇️
...ssdk/core/internal/http/AmazonAsyncHttpClient.java 91.11% <ø> (-4.64%) 0 <0> (ø)
...sdk/core/internal/http/HttpClientDependencies.java 69.56% <0%> (-30.44%) 0 <0> (ø)
...edentials/internal/LazyAwsCredentialsProvider.java 50% <100%> (-6.25%) 0 <0> (ø)
...awssdk/core/retry/conditions/OrRetryCondition.java 60% <100%> (+3.75%) 0 <0> (ø) ⬇️
.../software/amazon/awssdk/core/SdkSystemSetting.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...re/amazon/awssdk/awscore/retry/AwsRetryPolicy.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...ware/amazon/awssdk/core/http/ExecutionContext.java 75.86% <100%> (ø) 0 <0> (ø) ⬇️
... and 92 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 13b94b2...7617d61. Read the comment docs.

Copy link
Contributor

@zoewangg zoewangg left a comment

Choose a reason for hiding this comment

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

Still going through the PR.

@@ -37,10 +36,10 @@
private final ExecutionAttributes executionAttributes;

private ExecutionContext(final Builder builder) {
this.signer = Validate.paramNotNull(builder.signer, "signer");
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did we remove those validations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added them originally, but in hindsight they just made testing more difficult.

I ended up not needing them removed, because I changed the way I was testing this change, so I could add them back in again.

@millems millems force-pushed the millem/retry-improvements branch from 130e421 to f68b47e Compare March 5, 2020 19:52
@millems millems force-pushed the millem/retry-improvements branch 2 times, most recently from c541587 to d1c2a59 Compare March 6, 2020 20:29
@millems millems force-pushed the millem/retry-improvements branch 2 times, most recently from 2a1862c to b4dbc44 Compare March 6, 2020 22:47
1. Added support for "retry modes". A retry mode allows configuring multiple SDK parameters at once using default retry profiles, some of which are standardized between AWS SDK languages. See RetryMode javadoc for more information.
2. Added the ability to configure or disable the default retry throttling behavior of the SDK that 'kicks in' during a large volume of retriable service call errors. This behavior can now be configured via `RetryPolicy.retryCapacityCondition`.
3. Fixed an issue where the retry condition returned by `RetryPolicy.retryCondition` differed from the one specified by `RetryPolicy.Builder.retryCondition`. The old value can be accessed via the new `RetryPolicy.aggregateRetryCondition`.
4. Fixed an issue where specifying your own retry policy would override AWS and service-specific retry conditions. By default, all retry policies now have AWS and service-specific retry conditions added. This can be disabled via the new `RetryPolicy.furtherRefinementsAllowed(false)`.
@millems millems force-pushed the millem/retry-improvements branch from 3799a64 to 329cd60 Compare March 6, 2020 23:46
@millems millems merged commit 77b07a2 into master Mar 7, 2020
@millems millems deleted the millem/retry-improvements branch March 7, 2020 00:06
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 7, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 21 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

aws-sdk-java-automation added a commit that referenced this pull request Sep 9, 2021
…071cdf421

Pull request: release <- staging/3ba8be65-dc3b-4f8e-9b75-ee8071cdf421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants