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

Retry after DNS error for SQS #1511

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Retry after DNS error for SQS #1511

merged 1 commit into from
Sep 18, 2023

Conversation

themarolt
Copy link
Contributor

@themarolt themarolt commented Sep 18, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at 2b0a353

This pull request enhances the sqs library with a custom retry strategy for AWS SDK clients, based on the @smithy/util-retry dependency. This improves the error handling and resilience of the library when dealing with network issues and throttling. It also adds some new dependencies for queue URL validation and message types.

🤖 Generated by Copilot at 2b0a353

sqs library
better retries for messages
autumn wind of change

Why

How

🤖 Generated by Copilot at 2b0a353

  • Add @smithy/util-retry dependency to sqs library to provide a configurable retry strategy for AWS SDK clients (link, link, link, link)
  • Add psl dependency to sqs library to validate queue URLs (link, link)
  • Add @crowd/types dependency to sqs library to define message payloads and attributes (link)
  • Remove @aws-sdk/middleware-retry dependency from sqs library as it is replaced by @smithy/util-retry and already included as a sub-dependency by AWS SDK clients (link, link)
  • Import ConfiguredRetryStrategy class from @smithy/util-retry in client.ts and set it as the retryStrategy option for the SQS client constructor (link, link)
  • Modify error handling logic in receiveMessage, deleteMessage, sendMessage, and sendMessagesBulk functions in client.ts to check for DNS lookup failures and retry the operations, and to increase the maximum number of retries from 5 to 10 (link, link, link, link)
  • Add @aws-sdk/middleware-retry sub-dependency to package.json files of @aws-sdk/client-sqs, @aws-sdk/client-sso-oidc, @aws-sdk/client-sso, and @aws-sdk/client-sts dependencies, as it is required by them (link, link, link, link)
  • Add @smithy/service-error-classification and @smithy/types sub-dependencies to package-lock.json file of sqs library, as they are required by @smithy/util-retry (link, link, link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@themarolt themarolt added Bug Created by Linear-GitHub Sync Improvement Created by Linear-GitHub Sync labels Sep 18, 2023
@themarolt themarolt merged commit c8ab3aa into main Sep 18, 2023
9 checks passed
@themarolt themarolt deleted the hotfix/handle-sqs-dns-errors branch September 18, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Created by Linear-GitHub Sync Improvement Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants