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

Bundle Analysis: Add asset comparison and fetching PR files #480

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

JerrySentry
Copy link
Contributor

@JerrySentry JerrySentry commented Jan 16, 2025

codecov/engineering-team#3216
codecov/engineering-team#3203

Create a way AssetComparison object to better compare assets, the old version only compares the size changes whereas this new class supports loading more comparison related info. Also adds the ability to fetch list of modules related to the assets being compared including a way to filter out files.

This supporting changed will be used by the upcoming PRs for worker to enable BA PR comments to show large file changes for changed assets.

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.

@JerrySentry JerrySentry changed the title Jan 14 large files Bundle Analysis: Add asset comparison and fetching PR files Jan 16, 2025
@JerrySentry JerrySentry marked this pull request as ready for review January 16, 2025 17:28
@@ -160,6 +161,16 @@ def parse(self, path: str) -> Tuple[int, str]:
# but first we need to find the Asset by the hashed file name
dynamic_imports_list = self._parse_dynamic_imports()
if dynamic_imports_list:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Delete the old entries in the table before inserting the new data.

Copy link
Contributor

@suejung-sentry suejung-sentry left a comment

Choose a reason for hiding this comment

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

cool stuff!

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.90%. Comparing base (6c6d5a1) to head (9be52d8).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #480      +/-   ##
==========================================
- Coverage   90.30%   89.90%   -0.41%     
==========================================
  Files         434      324     -110     
  Lines       12973     9119    -3854     
  Branches     2113     1615     -498     
==========================================
- Hits        11715     8198    -3517     
+ Misses       1143      858     -285     
+ Partials      115       63      -52     
Flag Coverage Δ
shared-docker-uploader ?

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JerrySentry JerrySentry added this pull request to the merge queue Jan 22, 2025
Merged via the queue into main with commit e854f50 Jan 22, 2025
6 checks passed
@JerrySentry JerrySentry deleted the jan_14_large_files branch January 22, 2025 22:14
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