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

fix(test results): accept null branch and add default branch #708

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

joseph-sentry
Copy link
Contributor

previously the test results upload endpoint did not require a branch field in the data included with the upload but it also did not allow null values for the branch field, so in v0.7.3 of the CLI when we added the branch field to the upload, some uploads were broken because the CLI would not be able to detect a branch and so the branch field would be set to None.

This change modifies the endpoint to accept null values for the branch and if the endpoint is creating the Commit object in the database and the branch field is set to null then it will set the branch field of the commit to the default branch of the repo it's targetting.

previously the test results upload endpoint did not require a branch
field in the data included with the upload but it also did not allow
null values for the branch field, so in v0.7.3 of the CLI when we
added the branch field to the upload, some uploads were broken because
the CLI would not be able to detect a branch and so the branch field
would be set to None.

This change modifies the endpoint to accept null values for the branch
and if the endpoint is creating the Commit object in the database and
the branch field is set to null then it will set the branch field of
the commit to the default branch of the repo it's targetting.
@joseph-sentry joseph-sentry requested a review from a team as a code owner July 24, 2024 15:43
@codecov-notifications
Copy link

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 Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.65%. Comparing base (8339939) to head (c5db211).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main     #708   +/-   ##
=======================================
  Coverage   91.65%   91.65%           
=======================================
  Files         632      632           
  Lines       16917    16917           
=======================================
  Hits        15506    15506           
  Misses       1411     1411           
Flag Coverage Δ
unit 91.65% <100.00%> (ø)
unit-latest-uploader 91.65% <100.00%> (ø)

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

Files Coverage Δ
upload/views/test_results.py 98.63% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.65%. Comparing base (8339939) to head (c5db211).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #708   +/-   ##
=======================================
  Coverage   91.65%   91.65%           
=======================================
  Files         632      632           
  Lines       16917    16917           
=======================================
  Hits        15506    15506           
  Misses       1411     1411           
Flag Coverage Δ
unit 91.65% <100.00%> (ø)
unit-latest-uploader 91.65% <100.00%> (ø)

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

Files Coverage Δ
upload/views/test_results.py 98.63% <100.00%> (ø)

... and 1 file with indirect coverage changes

Impacted file tree graph

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.00%. Comparing base (8339939) to head (c5db211).
Report is 1 commits behind head on main.

Changes have been made to critical files, which contain lines commonly executed in production. Learn more

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@               Coverage Diff                @@
##               main       #708        +/-   ##
================================================
+ Coverage   95.98000   96.00000   +0.02000     
================================================
  Files           812        812                
  Lines         18254      18323        +69     
================================================
+ Hits          17522      17591        +69     
  Misses          732        732                
Flag Coverage Δ
unit 91.65% <100.00%> (ø)
unit-latest-uploader 91.65% <100.00%> (ø)

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.

@joseph-sentry joseph-sentry added this pull request to the merge queue Jul 24, 2024
Merged via the queue into main with commit 1d43d35 Jul 24, 2024
21 of 22 checks passed
@joseph-sentry joseph-sentry deleted the joseph/update-test-results branch July 24, 2024 17:17
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