Repository navigation
Conversation
Add retry_base_delay and retry_max_delay next to retry_count. The delay doubles per attempt up to the maximum; both default to the previous behavior of retrying immediately. Only retry errors that can plausibly succeed later, and name the error in the retry message so the reason is visible at normal verbosity.
808aa51 to
b42dd0e
Compare
|
Force-pushed rubocup fix |
| # Errors that may well succeed on a later attempt. Anything not matched | ||
| # here is treated as permanent: a missing repository or a rejected | ||
| # credential does not get better by asking again. | ||
| TRANSIENT_ERROR_RX = / |
There was a problem hiding this comment.
Instead of trying to exhaustively list transient errors and hoping that we have all of them (thus changing the current retry behaviour), I would have preferred to take the other route and identify non-transient errors. It would have less impact in the case of a non-transient errors that is misclassified (would take longer to fail, while in the current case of a misclassified transient, we get a failure where we had none previously)
There was a problem hiding this comment.
Good point. I inverted the behavior (and renamed it to permanent_error?) Also added some tests
There was a problem hiding this comment.
There are also some transient errors in-between the HTTP 4xx: 408 Request Timeout, 429 Too Many Requests. Maybe just list 401, 403, 404, 410 for the most probable permanent status codes.
There was a problem hiding this comment.
Done. I assume this is what you meant (i.e., still keep the non HTTP-code messages)
Added some test cases
e725b76 to
83a21da
Compare
doudou
left a comment
There was a problem hiding this comment.
I think that Pierre's comment makes sense on HTTP codes ... just fix that and good to go for me.
Also, git actually prints `... error: 403` not `... error 403`.
|
Test actions appear to be stuck in "install subversion" phase ... |
Before this, 10 retries fired in ~3s with no delay, i.e., any outage longer than a few seconds fails the import.
It also retried errors which are unlikely to recover, like missing repository.
Default
retry_base_delay=0does not change behavior, to change this, write e.g. this into your init.rb: