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
[mlflow/R] Retry 429s in R's res client. #1851
[mlflow/R] Retry 429s in R's res client. #1851
Conversation
x <- mlflow_rest(client = client, max_rate_limit_interval = 2) | ||
expect_equal(x$text, "text") | ||
next_id <<- 1 | ||
x <- mlflow_rest(client = client, max_rate_limit_interval = 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Looks like we test the exact same behavior twice? i.e.
x <- mlflow_rest(client = client, max_rate_limit_interval = 2)
expect_equal(x$text, "text")
next_id <<- 1
is repeated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a slight difference, the first call does not reset nex_id so only the first call returns 429, the second call returns 200. Not sure if we need this as a separate test case though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #1851 +/- ##
==========================================
+ Coverage 83% 83.25% +0.25%
==========================================
Files 20 20
Lines 1000 1009 +9
==========================================
+ Hits 830 840 +10
+ Misses 170 169 -1
Continue to review full report at Codecov.
|
* Added retries for 429s in the R REST client and a test. * Added retries of 429s to R client. * nit.
What changes are proposed in this pull request?
Similarly to other clients, R should retry 429s.
How is this patch tested?
Unit test.
Release Notes
Rest client in R will now retry 429 codes (rate limit exceeded) with an exponential backoff.
Is this a user-facing change?
(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)
What component(s) does this PR affect?
How should the PR be classified in the release notes? Choose one:
rn/breaking-change
- The PR will be mentioned in the "Breaking Changes" sectionrn/none
- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/feature
- A new user-facing feature worth mentioning in the release notesrn/bug-fix
- A user-facing bug fix worth mentioning in the release notesrn/documentation
- A user-facing documentation change worth mentioning in the release notes