Skip to content

Fix retry logic (#2573) (#2572)#2574

Merged
tustvold merged 5 commits into
apache:masterfrom
tustvold:fix-retry-logic
Aug 25, 2022
Merged

Fix retry logic (#2573) (#2572)#2574
tustvold merged 5 commits into
apache:masterfrom
tustvold:fix-retry-logic

Conversation

@tustvold

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes apache/arrow-rs-object-store#232
Closes apache/arrow-rs-object-store#233

Rationale for this change

See tickets

What changes are included in this PR?

Fixes the retry logic to actually retry server errors, and also to improve the rendering of client errors to include the response payload

Are there any user-facing changes?

Better error messages, and actually working retries 😄

use reqwest::{Client, Method, StatusCode};
use std::time::Duration;

#[tokio::test]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. Unit tests shall not use external systems. It's PITA when your CI fails because X is down or your CI infra IPs get throttled/blocked due to excessive requests (remember that the IPs are shared w/ all the other users). So please find a mocking solution.
  2. I don't see a single test for "retried once and then passed".

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.

Fixed PTAL

@crepererum crepererum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks a lot! :)

@tustvold tustvold merged commit 8eea918 into apache:master Aug 25, 2022
@ursabot

ursabot commented Aug 25, 2022

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = 9822d62 and contender = 8eea918. 8eea918 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

alamb pushed a commit to alamb/arrow-rs that referenced this pull request Mar 20, 2025
* Fix retry logic (#2573) (#2572)

* Fix logical conflicts

* Rework tests
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.

Print Response Body On Error Retry Logic Fails to Retry Server Errors

3 participants