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
Update test instances to use local commitid and branch fields #426
Conversation
Signed-off-by: joseph-sentry <[email protected]>
This is a task meant to populate the commitid and branch fields for test instances that are missing this information. Signed-off-by: joseph-sentry <[email protected]>
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: tasks/test_results_processor.py
Did you find this useful? React with a 👍 or 👎 |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found Additional details and impacted files@@ Coverage Diff @@
## main #426 +/- ##
==========================================
- Coverage 97.44% 97.37% -0.07%
==========================================
Files 395 396 +1
Lines 33426 33454 +28
==========================================
+ Hits 32572 32576 +4
- Misses 854 878 +24
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #426 +/- ##
==========================================
- Coverage 97.47% 97.41% -0.06%
==========================================
Files 426 427 +1
Lines 34117 34257 +140
==========================================
+ Hits 33254 33371 +117
- Misses 863 886 +23
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes This change has been scanned for critical changes. Learn more |
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #426 +/- ##
==========================================
- Coverage 97.44% 97.37% -0.07%
==========================================
Files 395 396 +1
Lines 33426 33454 +28
==========================================
+ Hits 32572 32576 +4
- Misses 854 878 +24
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
please check the comments before merging
commitid=None, | ||
) | ||
num_test_instances = test_instance_filter.count() | ||
all_test_instances = test_instance_filter.all() |
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.
Depending on how many test instances we have this could lead to OOM errors, right? I think there are millions of test instances, after all.
Consider using the yield_per
here, so we don't get everything into memory at once.
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.
You can use the yield_per
value as the chunk size and simplify the code a bit.
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.
this is using the django models so because we're turning it into chunks later in the code, this won't load everything at once, it should only load that chunk of objects, update them, then load the next chunk
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.
Interesting. Today I learned.
We want to move the commitid and branch information for a test instance to directly on the object, so that when we query we don't have to join with the commits table.