Skip to content
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

fix(AWSLocation): Fixing clock skew retries #5491

Merged
merged 3 commits into from
Jan 10, 2025
Merged

Conversation

sebaland
Copy link
Member

Description of changes:

This PR fixes the retry mechanism when dealing with clock skews in AWSLocation. The logic is actually implemented in the AWSURLRequestRetryHandler, but it depends on both the error domain and code to be from AWSService itself.

Because the AWSLocation service defines its own error domain and codes, the conditions were never met and isClockSkewError always evaluated to false.

So I've just added some code to handle cases in which the error can be mapped to a "vanilla" AWSService error instead, which then makes the retry mechanism work.

Note: This is actually affecting every AWS service that defines its own set of errors and does not override the proper methods in AWSURLRequestRetryHandler. It should be fixed

Check points:

  • Added new tests to cover change, if needed
  • All unit tests pass
  • All integration tests pass
  • Updated CHANGELOG.md
  • Documentation update for the change if required
  • PR title conforms to conventional commit style

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sebaland sebaland requested review from awsmobilesdk and a team as code owners January 10, 2025 16:46
@sebaland sebaland merged commit 95a2a45 into main Jan 10, 2025
67 checks passed
@sebaland sebaland deleted the ruisebas/fix-retry-location branch January 10, 2025 20:07
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.

4 participants