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

Cache and move load_commit_diff out of Report lock #784

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

Swatinem
Copy link
Contributor

Moves the load_commit_diff portion out of save_report_results.

This way, the whole commit diff loading can be moved outside of the Report merge lock. Additionally, the function was decorated with a cache, as the diff for a commit will never change.

@Swatinem Swatinem requested a review from a team October 15, 2024 11:41
@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.01%. Comparing base (220be0a) to head (80a8138).
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     #784      +/-   ##
==========================================
- Coverage   98.01%   98.01%   -0.01%     
==========================================
  Files         442      442              
  Lines       36603    36597       -6     
==========================================
- Hits        35875    35869       -6     
  Misses        728      728              
Flag Coverage Δ
integration 98.01% <100.00%> (-0.01%) ⬇️
unit 98.01% <100.00%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 95.87% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <ø> (-0.01%) ⬇️
Files with missing lines Coverage Δ
tasks/tests/unit/test_upload_finisher_task.py 100.00% <ø> (ø)
tasks/tests/unit/test_upload_processing_task.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.73% <100.00%> (ø)
tasks/upload_processor.py 99.44% <100.00%> (+0.02%) ⬆️

... and 1 file with indirect coverage changes

@codecov-staging
Copy link

codecov-staging bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #784      +/-   ##
==========================================
- Coverage   98.01%   98.01%   -0.01%     
==========================================
  Files         442      442              
  Lines       36603    36597       -6     
==========================================
- Hits        35875    35869       -6     
  Misses        728      728              
Flag Coverage Δ
integration 98.01% <100.00%> (-0.01%) ⬇️
unit 98.01% <100.00%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 95.87% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <ø> (-0.01%) ⬇️
Files with missing lines Coverage Δ
tasks/tests/unit/test_upload_finisher_task.py 100.00% <ø> (ø)
tasks/tests/unit/test_upload_processing_task.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.73% <100.00%> (ø)
tasks/upload_processor.py 99.44% <100.00%> (+0.02%) ⬆️

... and 1 file with indirect coverage changes

@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.01%. Comparing base (220be0a) to head (80a8138).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #784      +/-   ##
==========================================
- Coverage   98.01%   98.01%   -0.01%     
==========================================
  Files         442      442              
  Lines       36603    36597       -6     
==========================================
- Hits        35875    35869       -6     
  Misses        728      728              
Flag Coverage Δ
integration 98.01% <100.00%> (-0.01%) ⬇️
unit 98.01% <100.00%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 95.87% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <ø> (-0.01%) ⬇️
Files with missing lines Coverage Δ
tasks/tests/unit/test_upload_finisher_task.py 100.00% <ø> (ø)
tasks/tests/unit/test_upload_processing_task.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.73% <100.00%> (ø)
tasks/upload_processor.py 99.44% <100.00%> (+0.02%) ⬆️

... and 1 file with indirect coverage changes

Copy link

codecov-public-qa bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.01%. Comparing base (220be0a) to head (80a8138).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #784      +/-   ##
==========================================
- Coverage   98.01%   98.01%   -0.01%     
==========================================
  Files         442      442              
  Lines       36603    36597       -6     
==========================================
- Hits        35875    35869       -6     
  Misses        728      728              
Flag Coverage Δ
integration 98.01% <100.00%> (-0.01%) ⬇️
unit 98.01% <100.00%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 95.87% <100.00%> (+<0.01%) ⬆️
OutsideTasks 97.99% <ø> (-0.01%) ⬇️
Files Coverage Δ
tasks/tests/unit/test_upload_finisher_task.py 100.00% <ø> (ø)
tasks/tests/unit/test_upload_processing_task.py 100.00% <100.00%> (ø)
tasks/upload_finisher.py 97.73% <100.00%> (ø)
tasks/upload_processor.py 99.44% <100.00%> (+0.02%) ⬆️

... and 1 file with indirect coverage changes

Moves the `load_commit_diff` portion out of `save_report_results`.

This way, the whole commit diff loading can be moved outside of the Report merge lock.
Additionally, the function was decorated with a cache, as the diff for a commit will never change.
@Swatinem Swatinem added this pull request to the merge queue Oct 16, 2024
Merged via the queue into main with commit 112592f Oct 16, 2024
26 of 27 checks passed
@Swatinem Swatinem deleted the swatinem/cache-get-diff branch October 16, 2024 09:08
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