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: compare with stored compareSha if applicable #626

Merged
merged 10 commits into from
Aug 22, 2024

Conversation

JerrySentry
Copy link
Contributor

For PR Comments of BA, when doing a comparison, try to find the base commit of the head commit based on the stored custom compareSha in the bundle report first, if not found default back to using commit.parent.

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.

@codecov-notifications
Copy link

codecov-notifications bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #626   +/-   ##
=======================================
  Coverage   98.13%   98.13%           
=======================================
  Files         440      440           
  Lines       36719    36764   +45     
=======================================
+ Hits        36035    36080   +45     
  Misses        684      684           
Flag Coverage Δ
integration 98.13% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.13% <100.00%> (+<0.01%) ⬆️
unit 98.13% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 96.11% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.11% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/bundle_analysis/comparison.py 100.00% <ø> (ø)
...otify/contexts/tests/test_commit_status_context.py 100.00% <100.00%> (ø)
services/bundle_analysis/report.py 100.00% <100.00%> (ø)
...ices/bundle_analysis/tests/test_bundle_analysis.py 99.00% <100.00%> (+0.02%) ⬆️
.../tests/unit/test_bundle_analysis_processor_task.py 99.77% <100.00%> (+0.01%) ⬆️

@codecov-qa
Copy link

codecov-qa bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.13%. Comparing base (e3bd10e) to head (3694729).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #626   +/-   ##
=======================================
  Coverage   98.13%   98.13%           
=======================================
  Files         440      440           
  Lines       36719    36764   +45     
=======================================
+ Hits        36035    36080   +45     
  Misses        684      684           
Flag Coverage Δ
integration 98.13% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.13% <100.00%> (+<0.01%) ⬆️
unit 98.13% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 96.11% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.11% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/bundle_analysis/comparison.py 100.00% <ø> (ø)
...otify/contexts/tests/test_commit_status_context.py 100.00% <100.00%> (ø)
services/bundle_analysis/report.py 100.00% <100.00%> (ø)
...ices/bundle_analysis/tests/test_bundle_analysis.py 99.00% <100.00%> (+0.02%) ⬆️
.../tests/unit/test_bundle_analysis_processor_task.py 99.77% <100.00%> (+0.01%) ⬆️

Copy link

codecov-public-qa bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.13%. Comparing base (e3bd10e) to head (3694729).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #626   +/-   ##
=======================================
  Coverage   98.13%   98.13%           
=======================================
  Files         440      440           
  Lines       36719    36764   +45     
=======================================
+ Hits        36035    36080   +45     
  Misses        684      684           
Flag Coverage Δ
integration 98.13% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.13% <100.00%> (+<0.01%) ⬆️
unit 98.13% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 96.11% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.11% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/bundle_analysis/comparison.py 100.00% <ø> (ø)
...otify/contexts/tests/test_commit_status_context.py 100.00% <100.00%> (ø)
services/bundle_analysis/report.py 100.00% <100.00%> (ø)
...ices/bundle_analysis/tests/test_bundle_analysis.py 99.00% <100.00%> (+0.02%) ⬆️
.../tests/unit/test_bundle_analysis_processor_task.py 99.77% <100.00%> (+0.01%) ⬆️

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.16%. Comparing base (e3bd10e) to head (3694729).
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     #626   +/-   ##
=======================================
  Coverage   98.16%   98.16%           
=======================================
  Files         475      475           
  Lines       37924    37969   +45     
=======================================
+ Hits        37227    37272   +45     
  Misses        697      697           
Flag Coverage Δ
integration 98.13% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 98.13% <100.00%> (+<0.01%) ⬆️
unit 98.13% <100.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
NonTestCode 96.15% <100.00%> (+<0.01%) ⬆️
OutsideTasks 98.11% <100.00%> (+<0.01%) ⬆️
Files Coverage Δ
services/bundle_analysis/comparison.py 100.00% <ø> (ø)
...otify/contexts/tests/test_commit_status_context.py 100.00% <100.00%> (ø)
services/bundle_analysis/report.py 100.00% <100.00%> (ø)
...ices/bundle_analysis/tests/test_bundle_analysis.py 99.00% <100.00%> (+0.02%) ⬆️
.../tests/unit/test_bundle_analysis_processor_task.py 99.77% <100.00%> (+0.01%) ⬆️

This change has been scanned for critical changes. Learn more

requirements.in Outdated
@@ -1,5 +1,5 @@
https://github.com/codecov/opentelem-python/archive/refs/tags/v0.0.4a1.tar.gz#egg=codecovopentelem
https://github.com/codecov/shared/archive/76a3263079150e47059a3b08c7ef3a29e7e78cf4.tar.gz#egg=shared
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to be updated once the Shared PR merges to main

@JerrySentry JerrySentry marked this pull request as ready for review August 15, 2024 23:06
@@ -118,25 +118,48 @@ async def initialize_and_save_report(
db_session.flush()
return commit_report

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactor this a little bit, instead of having _previous_bundle_analysis_report fetch the commit to use then fetch the BA report, it will call _get_parent_commit to fetch the commit. _get_parent_commit function will try to select the "premerge commit" if available in the head BA report if not default back to selecting commit.parent.

@JerrySentry JerrySentry added this pull request to the merge queue Aug 22, 2024
Merged via the queue into main with commit aa627f6 Aug 22, 2024
25 of 26 checks passed
@JerrySentry JerrySentry deleted the aug_14_pcm_parent branch August 22, 2024 16:40
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