-
Notifications
You must be signed in to change notification settings - Fork 28
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: Add bundle analysis comparisons #330
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #330 +/- ##
==========================================
+ Coverage 96.02% 96.05% +0.03%
==========================================
Files 620 623 +3
Lines 15985 16141 +156
==========================================
+ Hits 15349 15505 +156
Misses 636 636
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov Report
@@ Coverage Diff @@
## main #330 +/- ##
==========================================
+ Coverage 96.02% 96.05% +0.03%
==========================================
Files 620 623 +3
Lines 15985 16141 +156
==========================================
+ Hits 15349 15505 +156
Misses 636 636
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 ✅
Additional details and impacted files@@ Coverage Diff @@
## main #330 +/- ##
=======================================
+ Coverage 95.64 95.68 +0.04
=======================================
Files 735 738 +3
Lines 16500 16655 +155
=======================================
+ Hits 15781 15936 +155
Misses 719 719
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
assert loader == True | ||
|
||
def test_loader_only_coverage_base_report(self): |
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: prefer renaming this test and the one below to test_loader_only_missing_base/head_report
as that what we are asserting on
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.
👍
|
||
def load_time_conversion(size): | ||
""" | ||
Converts total size in bytes to approximate time (in seconds) to download using a 3G internet (3 Mbps) |
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.
Did we decide on 3G as a standard?
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.
I don't think we did a full discussion around what download speed we should do, but probably the most widely used speed. I envision in future iterations we can provide as input what the preferred speed is to make the calculation. But this should suffice for now in the v0.
services/bundle_analysis.py
Outdated
self.comparison.head_report | ||
and self.comparison.head_report.bundle_report(bundle_change.bundle_name) | ||
): | ||
head_bundle_report_size = self.comparison.head_report.bundle_report( |
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.
Consider declaring self.comparison.head_report.bundle_report(..)
as a variable so we're not calling it twice.
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.
👍
BundleAnalysisComparison | ||
| FirstPullRequest | ||
| MissingBaseCommit | ||
| MissingHeadCommit |
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.
Can this ever be MissingHeadCommit
?. The function the resolver calls in commit.py
does not return that type.
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 also gets called in pull.py
which can return MissingHeadCommit
Purpose/Motivation
Links to relevant tickets
codecov/engineering-team#955
codecov/engineering-team#959
codecov/engineering-team#960
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.