-
Notifications
You must be signed in to change notification settings - Fork 11
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
Retry UploadFinisher
when Report is locked
#786
Conversation
Instead of failing with a `LockError`, this copy-pasted the same retry logic as the `UploadProcessor` has.
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #786 +/- ##
=======================================
Coverage 98.03% 98.03%
=======================================
Files 442 442
Lines 36601 36620 +19
=======================================
+ Hits 35882 35901 +19
Misses 719 719
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## main #786 +/- ##
=======================================
Coverage 98.03% 98.03%
=======================================
Files 442 442
Lines 36601 36620 +19
=======================================
+ Hits 35882 35901 +19
Misses 719 719
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #786 +/- ##
=======================================
Coverage 98.03% 98.03%
=======================================
Files 442 442
Lines 36601 36620 +19
=======================================
+ Hits 35882 35901 +19
Misses 719 719
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #786 +/- ##
=======================================
Coverage 98.03% 98.03%
=======================================
Files 442 442
Lines 36601 36620 +19
=======================================
+ Hits 35882 35901 +19
Misses 719 719
Flags with carried forward coverage won't be shown. Click here to find out more.
|
) | ||
except LockError: | ||
max_retry = 200 * 3**self.request.retries | ||
retry_in = min(random.randint(max_retry // 2, max_retry), 60 * 60 * 5) |
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.
So 60605 is 5 hours correct? Are we okay that being the minimum number to retry for big numbers of self.request.retries?
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.
So far this was just copied from the other place that does locking. I would like to revisit this at some point, and reduce the retry intervals, as well as use try-lock instead of blocking.
Instead of failing with a
LockError
, this copy-pasted the same retry logic as theUploadProcessor
has.Fixes WORKER-PJE