Skip to content

fix(smithy_aws): Retry transient transport failures (AWSHttpException) - #7263

Draft
VarshithaPamisetty wants to merge 7 commits into
mainfrom
fix/retry-transient-transport-errors
Draft

fix(smithy_aws): Retry transient transport failures (AWSHttpException)#7263
VarshithaPamisetty wants to merge 7 commits into
mainfrom
fix/retry-transient-transport-errors

Conversation

@VarshithaPamisetty

@VarshithaPamisetty VarshithaPamisetty commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

AWSRetryer didn't retry transient transport failures (dropped handshakes, connection resets), which surface as AWSHttpException. The HTTP client now marks these as retryable via AWSHttpException.retryable(...), and the retryer retries only those.

Tests

  • Unit + recovery tests: a retryable transport failure recovers; a non-transport one isn't retried.
  • aws_common test: the client flags a failed connection as retryable.
  • Retry-sensitive suites pass; dart analyze/format clean.
  • Real S3 with an injected dropped handshake: fails without the change, passes with it.

@VarshithaPamisetty
VarshithaPamisetty requested a review from a team as a code owner August 11, 2026 17:34
@VarshithaPamisetty VarshithaPamisetty self-assigned this Aug 11, 2026
@codecov-commenter

codecov-commenter commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.98%. Comparing base (b0c2048) to head (b691300).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7263      +/-   ##
==========================================
+ Coverage   40.97%   40.98%   +0.01%     
==========================================
  Files         121      121              
  Lines        8273     8273              
  Branches     3598     3598              
==========================================
+ Hits         3390     3391       +1     
+ Misses       4883     4882       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +99 to +102
// Transport-level failures never reached the server, so are safe to retry.
if (exception is AWSHttpException) {
return true;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. AWSHttpException has no status code so we can't check codes, and those two are response errors, not transport. Instead of trusting the type, the HTTP client now marks the real transport failures with AWSHttpException.retryable(...) and the retryer only retries the flagged ones, so those two stay non-retryable.

@VarshithaPamisetty
VarshithaPamisetty marked this pull request as draft August 12, 2026 17:21
@VarshithaPamisetty
VarshithaPamisetty marked this pull request as ready for review August 14, 2026 10:01
cadivus
cadivus previously approved these changes Aug 14, 2026
@cadivus
cadivus self-requested a review August 14, 2026 14:38
@cadivus
cadivus dismissed their stale review August 14, 2026 14:40

Should we check the HTTP code before setting the exception to retryable? Or even catch more fine granular?

@VarshithaPamisetty
VarshithaPamisetty marked this pull request as draft August 17, 2026 09:57
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