-
Notifications
You must be signed in to change notification settings - Fork 10
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
bundle analysis: remove unnecessary save measurements #723
Conversation
@@ -372,50 +374,51 @@ def save_measurements(self, commit: Commit, upload: Upload) -> ProcessingResult: | |||
] | |||
|
|||
db_session = commit.get_db_session() |
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.
The diff is basically from:
for bundle_report in bundle_analysis_report.bundle_reports():
<all the saving code>
to
bundle_report = bundle_analysis_report.bundle_report(bundle_name)
<all the saving code>
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.
Thank you for this comment, most helpful
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #723 +/- ##
=======================================
Coverage 98.07% 98.07%
=======================================
Files 434 434
Lines 36800 36803 +3
=======================================
+ Hits 36091 36094 +3
Misses 709 709
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 ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #723 +/- ##
=======================================
Coverage 98.07% 98.07%
=======================================
Files 434 434
Lines 36800 36803 +3
=======================================
+ Hits 36091 36094 +3
Misses 709 709
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 ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #723 +/- ##
=======================================
Coverage 98.07% 98.07%
=======================================
Files 434 434
Lines 36800 36803 +3
=======================================
+ Hits 36091 36094 +3
Misses 709 709
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 ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #723 +/- ##
=======================================
Coverage 98.12% 98.12%
=======================================
Files 475 475
Lines 38155 38158 +3
=======================================
+ Hits 37438 37441 +3
Misses 717 717
Flags with carried forward coverage won't be shown. Click here to find out more.
This change has been scanned for critical changes. Learn 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.
LGTM, left a comment
bundle_report.name, | ||
bundle_report.total_size(), | ||
) | ||
bundle_report = bundle_analysis_report.bundle_report(bundle_name) |
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.
it seems that this can be None
. We could early-return here if that's the case
@@ -372,50 +374,51 @@ def save_measurements(self, commit: Commit, upload: Upload) -> ProcessingResult: | |||
] | |||
|
|||
db_session = commit.get_db_session() |
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.
Thank you for this comment, most helpful
closes codecov/engineering-team#1875
No need to save every bundle of a commit, just save the processed bundle instead, otherwise it is inserting duplicate measurements to timeseries
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.