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 upload endpoint add custom compare SHA #649

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

JerrySentry
Copy link
Contributor

@JerrySentry JerrySentry commented Jun 28, 2024

closes codecov/engineering-team#2009

Add a compareSha param to the BA upload endpoint, this allows overriding default way of fetching comparison commit SHAs (ie Pull.compare_to or Commit.parent) with the current uploaded commit. This will be used as a solution for handling the "pre-merge commit" issue. This param will be consumed by the BundleAnalysisProcessor.

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 requested a review from a team as a code owner June 28, 2024 15:50
@codecov-staging
Copy link

codecov-staging bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.54%. Comparing base (dd84bf9) to head (d6fb074).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main     #649   +/-   ##
=======================================
  Coverage   91.54%   91.54%           
=======================================
  Files         621      621           
  Lines       16567    16572    +5     
=======================================
+ Hits        15166    15171    +5     
  Misses       1401     1401           
Flag Coverage Δ
unit 91.54% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 91.54% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
upload/views/bundle_analysis.py 98.76% <100.00%> (+0.08%) ⬆️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link

codecov-public-qa bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.54%. Comparing base (dd84bf9) to head (d6fb074).

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #649   +/-   ##
=======================================
  Coverage   91.54%   91.54%           
=======================================
  Files         621      621           
  Lines       16567    16572    +5     
=======================================
+ Hits        15166    15171    +5     
  Misses       1401     1401           
Flag Coverage Δ
unit 91.54% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 91.54% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
upload/views/bundle_analysis.py 98.76% <100.00%> (+0.08%) ⬆️

Impacted file tree graph

Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.94%. Comparing base (dd84bf9) to head (d6fb074).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##               main       #649   +/-   ##
===========================================
  Coverage   95.94000   95.94000           
===========================================
  Files           799        799           
  Lines         17884      17889    +5     
===========================================
+ Hits          17158      17163    +5     
  Misses          726        726           
Flag Coverage Δ
unit 91.54% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 91.54% <100.00%> (+<0.01%) ⬆️

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.

@eliatcodecov
Copy link
Contributor

@ai-review-prompt-prod testing out the production AI PR Review. You can ignore the recommendations if you get any.

@@ -73,6 +76,9 @@ def post(self, request):
else:
raise NotAuthenticated()

if repo is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

The authentication classes don't check if the repo exists already?
(asking for my own understanding)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't believe so, I just added this to appease the type checker because if the repo doesn't exist it will just report null for the repo var.

@JerrySentry JerrySentry added this pull request to the merge queue Jul 3, 2024
Merged via the queue into main with commit 92dd89f Jul 3, 2024
22 checks passed
@JerrySentry JerrySentry deleted the jun_28_upload_comparesha branch July 3, 2024 16:31
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.

[API] Allow compareSha (optional) argument to be received and pass that down to the Upload worker task
3 participants