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
chore: extend UploadFlow with new ending #418
Conversation
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: tasks/upload.py
Did you find this useful? React with a 👍 or 👎 |
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 #418 +/- ##
==========================================
- Coverage 97.44% 97.40% -0.05%
==========================================
Files 395 398 +3
Lines 33426 33583 +157
==========================================
+ Hits 32572 32711 +139
- Misses 854 872 +18
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 ✅
Changes have been made to critical files, which contain lines commonly executed in production. Learn more ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #418 +/- ##
==========================================
- Coverage 97.47% 97.46% -0.01%
==========================================
Files 426 429 +3
Lines 34117 35283 +1166
==========================================
+ Hits 33254 34388 +1134
- Misses 863 895 +32
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 25 files with indirect coverage changes
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #418 +/- ##
==========================================
- Coverage 97.44% 97.40% -0.05%
==========================================
Files 395 398 +3
Lines 33426 33583 +157
==========================================
+ Hits 32572 32711 +139
- Misses 854 872 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
|
It was a suspition that we might be overcounting beginnings in the UploadFlow. I believe one of the exit paths was not being covered in the `Upload` task. These changes add a new ending to the UploadFlow. Namely, for the scenario where an UploadTask finishes without enqueuing other tasks because there are no reports waiting to be processed. Also updating the `getutcnow` function that is deprecated and fixing some typos. Changes to LockManager are probably from running 3.12 locally (new error appeared), same thing for the test in `test_save_commit_measurements`
5c7aaa0
to
c35ed69
Compare
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.
Just a small nit.
tasks/upload.py
Outdated
is_final=( | ||
True | ||
if i == ceil(len(argument_list) / chunk_size) - 1 | ||
else False | ||
), |
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.
nit: simplification
is_final=( | |
True | |
if i == ceil(len(argument_list) / chunk_size) - 1 | |
else False | |
), | |
is_final=i == ceil(len(argument_list) / chunk_size) - 1 |
or for readability, set is_final
outside of the dict as a variable.
improve readability of lint change. following suggestion of @michelletran-codecov
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #418 +/- ##
==========================================
- Coverage 97.44% 97.40% -0.05%
==========================================
Files 395 398 +3
Lines 33422 33583 +161
==========================================
+ Hits 32568 32711 +143
- Misses 854 872 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
|
It was a suspition that we might be overcounting beginnings in the UploadFlow.
I believe one of the exit paths was not being covered in the
Upload
task.These changes add a new ending to the UploadFlow. Namely, for the scenario where
an UploadTask finishes without enqueuing other tasks because there are no reports
waiting to be processed.
Also updating the
getutcnow
function that is deprecated and fixing some typos.Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.