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

feat: upsert daily test rollup when we process a test instance #699

Merged
merged 4 commits into from
Sep 16, 2024

Conversation

joseph-sentry
Copy link
Contributor

daily test rollups are unique by repo, test, branch and date, the goal is to have a summary of all instances that ran for a test on a given day. We're basically frontloading part of the aggregation of the test instances

depends on: codecov/shared#352

daily test rollups are unique by repo, test, branch and date, the goal
is to have a summary of all instances that ran for a test on a given
day. We're basically frontloading part of the aggregation of the test
instances
@codecov-notifications
Copy link

codecov-notifications bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 97.93814% with 2 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files Patch % Lines
tasks/test_results_processor.py 90.90% 2 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #699      +/-   ##
==========================================
- Coverage   98.09%   98.09%   -0.01%     
==========================================
  Files         434      434              
  Lines       36643    36737      +94     
==========================================
+ Hits        35945    36037      +92     
- Misses        698      700       +2     
Flag Coverage Δ
integration 98.09% <97.93%> (-0.01%) ⬇️
latest-uploader-overall 98.09% <97.93%> (-0.01%) ⬇️
unit 98.09% <97.93%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 96.00% <94.59%> (-0.01%) ⬇️
OutsideTasks 98.10% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
database/models/reports.py 99.50% <100.00%> (+0.03%) ⬆️
...sks/tests/unit/test_test_results_processor_task.py 100.00% <100.00%> (ø)
tasks/test_results_processor.py 98.19% <90.90%> (-1.12%) ⬇️

@codecov-qa
Copy link

codecov-qa bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 97.93814% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.09%. Comparing base (26de475) to head (20f9e72).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tasks/test_results_processor.py 90.90% 2 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #699      +/-   ##
==========================================
- Coverage   98.09%   98.09%   -0.01%     
==========================================
  Files         434      434              
  Lines       36643    36737      +94     
==========================================
+ Hits        35945    36037      +92     
- Misses        698      700       +2     
Flag Coverage Δ
integration 98.09% <97.93%> (-0.01%) ⬇️
latest-uploader-overall 98.09% <97.93%> (-0.01%) ⬇️
unit 98.09% <97.93%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 96.00% <94.59%> (-0.01%) ⬇️
OutsideTasks 98.10% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
database/models/reports.py 99.50% <100.00%> (+0.03%) ⬆️
...sks/tests/unit/test_test_results_processor_task.py 100.00% <100.00%> (ø)
tasks/test_results_processor.py 98.19% <90.90%> (-1.12%) ⬇️

Copy link

codecov-public-qa bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 97.93814% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.09%. Comparing base (26de475) to head (20f9e72).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #699      +/-   ##
==========================================
- Coverage   98.09%   98.09%   -0.01%     
==========================================
  Files         434      434              
  Lines       36643    36737      +94     
==========================================
+ Hits        35945    36037      +92     
- Misses        698      700       +2     
Flag Coverage Δ
integration 98.09% <97.93%> (-0.01%) ⬇️
latest-uploader-overall 98.09% <97.93%> (-0.01%) ⬇️
unit 98.09% <97.93%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 96.00% <94.59%> (-0.01%) ⬇️
OutsideTasks 98.10% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
database/models/reports.py 99.50% <100.00%> (+0.03%) ⬆️
...sks/tests/unit/test_test_results_processor_task.py 100.00% <100.00%> (ø)
tasks/test_results_processor.py 98.19% <90.90%> (-1.12%) ⬇️

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 97.93814% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.13%. Comparing base (26de475) to head (20f9e72).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tasks/test_results_processor.py 90.90% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #699      +/-   ##
==========================================
- Coverage   98.13%   98.13%   -0.01%     
==========================================
  Files         475      475              
  Lines       37998    38092      +94     
==========================================
+ Hits        37291    37383      +92     
- Misses        707      709       +2     
Flag Coverage Δ
integration 98.09% <97.93%> (-0.01%) ⬇️
latest-uploader-overall 98.09% <97.93%> (-0.01%) ⬇️
unit 98.09% <97.93%> (-0.01%) ⬇️

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

Components Coverage Δ
NonTestCode 96.10% <94.59%> (-0.01%) ⬇️
OutsideTasks 98.10% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
database/models/reports.py 99.50% <100.00%> (+0.03%) ⬆️
...sks/tests/unit/test_test_results_processor_task.py 100.00% <100.00%> (ø)
tasks/test_results_processor.py 98.19% <90.90%> (-1.12%) ⬇️

This change has been scanned for critical changes. Learn more

@joseph-sentry joseph-sentry marked this pull request as ready for review September 12, 2024 16:37
Copy link

This PR includes changes to shared. Please review them here: codecov/shared@42f83ec...5cc5f48

@joseph-sentry joseph-sentry requested a review from a team September 12, 2024 16:39
@@ -143,12 +146,105 @@ def _bulk_write_tests_to_db(
)
)

def update_daily_total():
daily_totals[test_id]["last_duration_seconds"] = duration_seconds
Copy link
Contributor

@adrian-codecov adrian-codecov Sep 12, 2024

Choose a reason for hiding this comment

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

Nit: change these and (the ones below) to daily_totals.get(test_id, {}).get("last_duration_seconds") to prevent null errors.

Edit: I saw you define these below, so this isn't as applicable, but yet good practice if you want

Copy link
Contributor

@adrian-codecov adrian-codecov left a comment

Choose a reason for hiding this comment

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

Approving, with caveat of considering the caveats of having foreign keys in the partitioned models. Preferably merge after hours w/ infra to anticipate migration hiccups

Copy link

This PR includes changes to shared. Please review them here: codecov/shared@cdf263f...5cc5f48

@joseph-sentry joseph-sentry added this pull request to the merge queue Sep 16, 2024
Merged via the queue into main with commit 27fd7a5 Sep 16, 2024
24 of 27 checks passed
@joseph-sentry joseph-sentry deleted the joseph/daily-test-totals branch September 16, 2024 14:31
Copy link

sentry-io bot commented Sep 17, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ InternalError: (psycopg2.errors.InFailedSqlTransaction) current transaction is aborted, commands ignored until e... app.tasks.test_results.TestResultsProcessor View Issue
  • ‼️ IntegrityError: (psycopg2.errors.NotNullViolation) null value in column "branch" of relation "reports_dailytestro... app.tasks.test_results.TestResultsProcessor View Issue
  • ‼️ MaxRetriesExceededError: Can't retry app.tasks.test_results.TestResultsProcessor[006ab74c-d578-49fe-a982-85785ba6b598] arg... app.tasks.test_results.TestResultsProcessor View Issue
  • ‼️ ChordError: Dependency 006ab74c-d578-49fe-a982-85785ba6b598 raised MaxRetriesExceededError("Can't retry app.t... app.tasks.test_results.TestResultsProcessor View Issue

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

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