Add retry to some abuse tasks #23098
Open
+101
−37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: mozilla/addons#15359
Description
Adds retry to some tasks (as specified in the issue). Currently the settings are:
retry_jitter
: True
(by default) - all retry delays are variable, with the exact delay between 0 seconds and whatever the retry delay was calculated as.retry_backoff: 30
- the first retry will be (a maximum of) 30 seconds after; the retry after that (a maximum of) 60 seconds, then 120, and so on.retry_backoff_max: 60*60
- the maximum delay between retries will be 1 hourmax_retries: 79
- I calculated this with a spreadsheet, to see how many retries would be needed to retry for 72 hours. Though with retry_jitter it will be always less than 72 hours... so could need increasing.A report of an entity with many relationships can lead to multiple requests - the patch currently excludes those failures from retry as there's no easy way to retry part of a task.
Testing
addons-server-worker
container that the task failed with a request exceptionChecklist
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.