Repository navigation
fix(v4): run the standard retry interceptor after other attempt-completion hooks - #3465
Merged
stobrien89 merged 2 commits intoNov 27, 2026
Conversation
…etion hooks StandardRetryPlugin appends its interceptor, and AwsDynamicClient adds it after the S3 error plugin, so S3ErrorInterceptor and RetrySafetyInterceptor shape a retryable error before the retry decision.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
StandardRetryInterceptornow runs after the othermodifyBeforeAttemptCompletionhooks:StandardRetryPluginappends it to the chain.AwsDynamicClientaddsS3ErrorPluginbeforeStandardRetryPlugin, matching generated clients.Why
A new error thrown in a modify hook ends that hook's chain. With retry first,
S3ErrorInterceptorandRetrySafetyInterceptorwere skipped on retryable errors, so retried S3 errors reached the caller withoutx-amz-id-2. Retry now decides last, as in smithy-java and the Smithy interceptor guidance.Breaking change
The
modifyBeforeAttemptCompletionorder changes for every service: retry now runs last (before: retry, RetrySafety, S3Error; after: RetrySafety, S3Error, retry).Testing
New dynamic-client S3 tests (403, 503 SlowDown, 500 InternalError, retry then success) and a RetrySafety test fail without the fix and pass with it; full phpunit, phpstan level 8 and license check pass. Generated
S3Clientcases follow after #3464.