Closed sugmanue closed 3 months ago
There we lot of test files so was not able to pin point which test covers functional testing of this bug ? Could you please help with the Java test files which actually test the functionality when retry strategy is overridden.
Could you please help with the Java test files which actually test the functionality when retry strategy is overridden.
CanOverrideRetryStrategy.java (the link might not work but that's the name of the file at the very bottom of the changes)
Issues
17 New issues
0 Accepted issues
Measures
0 Security Hotspots
88.7% Coverage on New Code
0.0% Duplication on New Code
Motivation and Context
Fixes a bug that was found that prevents a retry strategy override from being used as it was overwritten once again to configure it for AWS.
The original logic was there to add AWS-specific retry conditions for when the user set the retry strategy using
RetryMode
or using the mutator to tailor the default oneConsumer<RetryStrategy.Builder>
. We eagerly created the retry strategy, but since this package (sdk-core
) does not know about AWS packages was not able to set the correct one, thus we did patch it after the fact, but this logic is not correct as it prevents user defined overrides to take place and will "over-configure" if an already AWS aware retry strategy is given.Modifications
We now resolve the retry strategy lazily, either when using
RetryMode
or the default one to apply the configured configurator. We need to add logic to the client builder classes and to the client to accomplish this in three different scenarios:For that the following method was added to the client builder and to the client to update the configuration after the plugins are run:
This implies that now the clients themselves have a direct dependency on
retries-spi
which was also added for all services updating theirpom.xml
.Testing
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License