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 requests when rate limited #143

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

anekkanti
Copy link
Member

@anekkanti anekkanti commented Oct 18, 2024

What was changed

The api client will retry when it runs into rate limiting.

Why?

This capability was accidentally removed in PR-121
This change adds the middleware back on the client.

Checklist

  1. Closes
    [Bug] Rate limit errors are not retried #142

  2. How was this tested:

  • CI
  • Manual

@anekkanti anekkanti requested a review from jlacefie October 18, 2024 13:02
@anekkanti anekkanti requested a review from a team as a code owner October 18, 2024 13:02
@jlacefie
Copy link
Collaborator

TY Abhinav. Reviewing this, it appears I removed a bit too much when replacing the previous manual dial with the Go client and we lost the backoff retry options, yes?

I'll pull down and test now and validate this resolves the issue. For context, I ran into this earlier this week and believe it can be recreated easily.

@anekkanti
Copy link
Member Author

TY Abhinav. Reviewing this, it appears I removed a bit too much when replacing the previous manual dial with the Go client and we lost the backoff retry options, yes?

Yes that is my understanding. I don't think the SDK we use provides this out of the box.

I'll pull down and test now and validate this resolves the issue. For context, I ran into this earlier this week and believe it can be recreated easily.

Thank you, I am also planning to do some tests on my end. More for my experience.

@jlacefie
Copy link
Collaborator

Thanks. Did you happen to ask if the Go SDK provides backoff support, similar to what's supported for WFs and Activities?

Copy link
Collaborator

@jlacefie jlacefie left a comment

Choose a reason for hiding this comment

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

TY. Looks good. This resolved the pervious errors experienced locally.

As a future item, we may want to explore if the SDK already supports retry policies for the Cloud Ops API and/or make a request to that repo and then refactor to use the SDK.

@anekkanti anekkanti merged commit f1c0ffb into main Oct 28, 2024
5 checks passed
@anekkanti anekkanti deleted the abhinav/retryWhenRateLimited branch October 28, 2024 13:41
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.

2 participants