Skip to content

enhancement: change retry strategy from legacy to standard #3128

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions .changes/nextrelease/update-default-retries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"type": "enhancement",
"category": "Retry",
"description": "Updates default retry mode from `legacy` to `standard` ."
}
]
2 changes: 1 addition & 1 deletion src/Retry/ConfigurationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ConfigurationProvider extends AbstractConfigurationProvider
implements ConfigurationProviderInterface
{
const DEFAULT_MAX_ATTEMPTS = 3;
const DEFAULT_MODE = 'legacy';
const DEFAULT_MODE = 'standard';
const ENV_MAX_ATTEMPTS = 'AWS_MAX_ATTEMPTS';
const ENV_MODE = 'AWS_RETRY_MODE';
const ENV_PROFILE = 'AWS_PROFILE';
Expand Down
4 changes: 2 additions & 2 deletions tests/Retry/ConfigurationProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function (ConfigurationException $e) {
public function testCreatesDefaultFromFallback()
{
$this->clearEnv();
$expected = new Configuration('legacy', 3);
$expected = new Configuration('standard', 3);
/** @var ConfigurationInterface $result */
$result = call_user_func(ConfigurationProvider::fallback())->wait();
$this->assertSame($expected->toArray(), $result->toArray());
Expand Down Expand Up @@ -142,7 +142,7 @@ public function testUsesIniWithUseAwsConfigFileTrue()
public function testIgnoresIniWithUseAwsConfigFileFalse()
{
$dir = $this->clearEnv();
$expected = new Configuration('legacy', 3);
$expected = new Configuration('standard', 3);
file_put_contents($dir . '/config', $this->iniFile);
putenv('HOME=' . dirname("garbageDirectory"));
/** @var ConfigurationInterface $result */
Expand Down