Skip to content
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

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

Swatinem
Copy link
Contributor

@Swatinem Swatinem commented Oct 15, 2024

Instead of failing with a LockError, this copy-pasted the same retry logic as the UploadProcessor has.


Fixes WORKER-PJE

Instead of failing with a `LockError`, this copy-pasted the same retry logic as the `UploadProcessor` has.
@Swatinem Swatinem requested a review from a team October 15, 2024 13:29
@Swatinem Swatinem self-assigned this Oct 15, 2024
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (70406db) to head (e31340b).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #786   +/-   ##
=======================================
  Coverage   98.03%   98.03%           
=======================================
  Files         442      442           
  Lines       36601    36620   +19     
=======================================
+ Hits        35882    35901   +19     
  Misses        719      719           
Flag Coverage Δ
integration 98.03% <100.00%> (+<0.01%) ⬆️
unit 98.03% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.92% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <ø> (ø)
Files with missing lines Coverage Δ
tasks/tests/unit/test_upload_finisher_task.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.73% <100.00%> (+0.07%) ⬆️

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #786   +/-   ##
=======================================
  Coverage   98.03%   98.03%           
=======================================
  Files         442      442           
  Lines       36601    36620   +19     
=======================================
+ Hits        35882    35901   +19     
  Misses        719      719           
Flag Coverage Δ
integration 98.03% <100.00%> (+<0.01%) ⬆️
unit 98.03% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.92% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <ø> (ø)
Files with missing lines Coverage Δ
tasks/tests/unit/test_upload_finisher_task.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.73% <100.00%> (+0.07%) ⬆️

@codecov-qa
Copy link

codecov-qa bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (70406db) to head (e31340b).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #786   +/-   ##
=======================================
  Coverage   98.03%   98.03%           
=======================================
  Files         442      442           
  Lines       36601    36620   +19     
=======================================
+ Hits        35882    35901   +19     
  Misses        719      719           
Flag Coverage Δ
integration 98.03% <100.00%> (+<0.01%) ⬆️
unit 98.03% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.92% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <ø> (ø)
Files with missing lines Coverage Δ
tasks/tests/unit/test_upload_finisher_task.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.73% <100.00%> (+0.07%) ⬆️

Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.03%. Comparing base (70406db) to head (e31340b).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #786   +/-   ##
=======================================
  Coverage   98.03%   98.03%           
=======================================
  Files         442      442           
  Lines       36601    36620   +19     
=======================================
+ Hits        35882    35901   +19     
  Misses        719      719           
Flag Coverage Δ
integration 98.03% <100.00%> (+<0.01%) ⬆️
unit 98.03% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 95.92% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <ø> (ø)
Files Coverage Δ
tasks/tests/unit/test_upload_finisher_task.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.73% <100.00%> (+0.07%) ⬆️

)
except LockError:
max_retry = 200 * 3**self.request.retries
retry_in = min(random.randint(max_retry // 2, max_retry), 60 * 60 * 5)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@Swatinem Swatinem added this pull request to the merge queue Oct 16, 2024
Merged via the queue into main with commit 9973c00 Oct 16, 2024
26 of 27 checks passed
@Swatinem Swatinem deleted the swatinem/retry-finisher-lock branch October 16, 2024 07:02
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.

2 participants