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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not retry rate-limited requests #3182

Merged
merged 2 commits into from
May 7, 2024

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented May 7, 2024

馃敆 Issue Links

Relates to https://github.com/GetStream/ios-issues-tracking/issues/800

馃幆 Goal

Do not retry rate-limited requests.

The requests will 100% fail, so it does not make sense to retry them.

馃И Manual Testing Notes

  1. Open Proxyman
  2. Use the rewrite tool
  3. Select one of the requests to rewrite
  4. Change the status code to: HTTP/1.1 429 Too Many Requests
  5. Change the response to:
{
  "StatusCode": 429,
  "code": 0,
  "details": [
    0
  ],
  "duration": "string",
  "exception_fields": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "message": "string",
  "more_info": "string"
}
  1. When the response fails, it should not retry.

鈽戯笍 Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero 鈿狅笍 policy (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (docusaurus, tutorial, CMS)

@nuno-vieira nuno-vieira requested a review from a team as a code owner May 7, 2024 12:31
@nuno-vieira nuno-vieira added the 馃寪聽SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK label May 7, 2024
@Stream-iOS-Bot
Copy link
Collaborator

StreamChat XCMetrics

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 1.67 ms 83.3% 馃敿 馃煝
Duration 2.6 s 2.55 s 1.92% 馃敿 馃煝
Hitch time ratio 4 ms per s 0.66 ms per s 83.5% 馃敿 馃煝
Frame rate 79 fps 78.66 fps 0.43% 馃敿 馃煝
Number of hitches 1 0.2 80.0% 馃敿 馃煝
ChannelList Hitches total duration 12.5 ms 6.68 ms 46.56% 馃敿 馃煝
Duration 2.6 s 2.15 s 17.31% 馃敿 馃煝
Hitch time ratio 5 ms per s 2.87 ms per s 42.6% 馃敿 馃煝
Frame rate 76 fps 78.74 fps -3.61% 馃斀 馃煛
Number of hitches 1.2 0.6 50.0% 馃敿 馃煝

Copy link
Contributor

@laevandus laevandus left a comment

Choose a reason for hiding this comment

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

Agree that we should not retry in this case.

@nuno-vieira nuno-vieira changed the title Do not retry rate limited requests Do not retry rate-limited requests May 7, 2024
@nuno-vieira nuno-vieira enabled auto-merge (squash) May 7, 2024 13:27
@nuno-vieira nuno-vieira disabled auto-merge May 7, 2024 13:45
@nuno-vieira
Copy link
Member Author

Merging it since it failed in a flaky test

@nuno-vieira nuno-vieira merged commit 3980550 into develop May 7, 2024
13 of 14 checks passed
@nuno-vieira nuno-vieira deleted the fix/do-not-retry-rate-limited-errors branch May 7, 2024 13:45
@laevandus laevandus mentioned this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃寪聽SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants