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

Update test instances to use local commitid and branch fields #426

Merged
merged 2 commits into from May 6, 2024

Conversation

joseph-sentry
Copy link
Contributor

@joseph-sentry joseph-sentry commented May 1, 2024

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.

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]>
Copy link

sentry-io bot commented May 1, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: tasks/test_results_processor.py

Function Unhandled Issue
process_individual_upload FileNotInStorageError: File test_results/v1/raw/2024-04-24/25D3451FB922A5B3C2F2E4A374E5B8F0/70420e6ec50159b47027cb5fb474... ...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

@codecov-qa
Copy link

codecov-qa bot commented May 1, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 97.37%. Comparing base (02be4f5) to head (f97d468).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found ☺️

Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
integration 97.37% <14.28%> (-0.07%) ⬇️
latest-uploader-overall 97.37% <14.28%> (-0.07%) ⬇️
unit 97.37% <14.28%> (-0.07%) ⬇️

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

Components Coverage Δ
NonTestCode 94.58% <14.28%> (-0.17%) ⬇️
OutsideTasks 97.55% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
celery_config.py 68.49% <100.00%> (+0.43%) ⬆️
database/models/reports.py 99.39% <100.00%> (+<0.01%) ⬆️
tasks/test_results_processor.py 99.31% <100.00%> (+<0.01%) ⬆️
tasks/backfill_test_instances.py 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

Copy link

codecov bot commented May 1, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 97.41%. Comparing base (02be4f5) to head (f97d468).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
integration 97.37% <14.28%> (-0.07%) ⬇️
latest-uploader-overall 97.37% <14.28%> (-0.07%) ⬇️
unit 97.37% <14.28%> (-0.07%) ⬇️

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

Components Coverage Δ
NonTestCode 94.66% <14.28%> (-0.12%) ⬇️
OutsideTasks 97.55% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
celery_config.py 68.49% <100.00%> (+0.43%) ⬆️
database/models/reports.py 99.39% <100.00%> (+<0.01%) ⬆️
tasks/test_results_processor.py 99.31% <100.00%> (+<0.01%) ⬆️
tasks/backfill_test_instances.py 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

This change has been scanned for critical changes. Learn more

Copy link

codecov-public-qa bot commented May 1, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 97.37%. Comparing base (02be4f5) to head (f97d468).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@            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     
Flag Coverage Δ
integration 97.37% <14.28%> (-0.07%) ⬇️
latest-uploader-overall 97.37% <14.28%> (-0.07%) ⬇️
unit 97.37% <14.28%> (-0.07%) ⬇️

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

Components Coverage Δ
NonTestCode 94.58% <14.28%> (-0.17%) ⬇️
OutsideTasks 97.55% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
celery_config.py 68.49% <100.00%> (+0.43%) ⬆️
database/models/reports.py 99.39% <100.00%> (+<0.01%) ⬆️
tasks/test_results_processor.py 99.31% <100.00%> (+<0.01%) ⬆️
tasks/backfill_test_instances.py 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@joseph-sentry joseph-sentry marked this pull request as ready for review May 1, 2024 19:30
@joseph-sentry joseph-sentry requested a review from a team May 1, 2024 19:31
Copy link
Contributor

@giovanni-guidini giovanni-guidini left a 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()
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Today I learned.

@joseph-sentry joseph-sentry added this pull request to the merge queue May 6, 2024
Merged via the queue into main with commit 2485119 May 6, 2024
15 of 25 checks passed
@joseph-sentry joseph-sentry deleted the joseph/update-test-instances branch May 6, 2024 15:32
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.

None yet

2 participants