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

feat: Public test results API #643

Merged
merged 9 commits into from
Jul 11, 2024
Merged

feat: Public test results API #643

merged 9 commits into from
Jul 11, 2024

Conversation

RulaKhaled
Copy link
Contributor

@RulaKhaled RulaKhaled commented Jun 27, 2024

Purpose/Motivation

What is the feature? Why is this being done?
Screenshot 2024-07-09 at 1 58 39 PM

Links to relevant tickets

codecov/engineering-team#1975

What does this PR do?

Include a brief description of the changes in this PR. Bullet points are your friend.

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

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 Jun 27, 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 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.60%. Comparing base (9423583) to head (bb6fee7).
Report is 53 commits behind head on main.

✅ All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main     #643      +/-   ##
==========================================
+ Coverage   91.49%   91.60%   +0.11%     
==========================================
  Files         615      630      +15     
  Lines       16370    16739     +369     
==========================================
+ Hits        14977    15334     +357     
- Misses       1393     1405      +12     
Flag Coverage Δ
unit 91.60% <100.00%> (+0.11%) ⬆️
unit-latest-uploader 91.60% <100.00%> (+0.11%) ⬆️

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

Files Coverage Δ
api/public/v2/test_results/serializers.py 100.00% <100.00%> (ø)
api/public/v2/test_results/views.py 100.00% <100.00%> (ø)
api/public/v2/urls.py 100.00% <100.00%> (ø)
reports/tests/factories.py 100.00% <100.00%> (ø)

... and 62 files 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-public-qa bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.60%. Comparing base (9423583) to head (bb6fee7).
Report is 53 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #643      +/-   ##
==========================================
+ Coverage   91.49%   91.60%   +0.11%     
==========================================
  Files         615      630      +15     
  Lines       16370    16739     +369     
==========================================
+ Hits        14977    15334     +357     
- Misses       1393     1405      +12     
Flag Coverage Δ
unit 91.60% <100.00%> (+0.11%) ⬆️
unit-latest-uploader 91.60% <100.00%> (+0.11%) ⬆️

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

Files Coverage Δ
api/public/v2/test_results/serializers.py 100.00% <100.00%> (ø)
api/public/v2/test_results/views.py 100.00% <100.00%> (ø)
api/public/v2/urls.py 100.00% <100.00%> (ø)
reports/tests/factories.py 100.00% <100.00%> (ø)

... and 62 files with indirect coverage changes

Impacted file tree graph

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.09%. Comparing base (9423583) to head (bb6fee7).
Report is 53 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       #643        +/-   ##
================================================
+ Coverage   95.92000   96.09000   +0.17000     
================================================
  Files           793        808        +15     
  Lines         17688      19094      +1406     
================================================
+ Hits          16968      18348      +1380     
- Misses          720        746        +26     
Flag Coverage Δ
unit 91.60% <100.00%> (+0.11%) ⬆️
unit-latest-uploader 91.60% <100.00%> (+0.11%) ⬆️

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.

@RulaKhaled RulaKhaled changed the title Public tests api feat: Public test results API Jul 9, 2024
@RulaKhaled RulaKhaled marked this pull request as ready for review July 9, 2024 13:07
filter_backends = [DjangoFilterBackend]
filterset_class = TestResultsFilters

def get_queryset(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be right if the entire function just be?

def get_queryset(self):
    return TestInstance.objects.filter(repoid=self.repo.repoid)

It should be the case that a Repository instance would always have a repoid.

Also return TestInstance.objects.none() would this return None when the callers would always expect an iterable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense!

@RulaKhaled RulaKhaled added this pull request to the merge queue Jul 11, 2024
Merged via the queue into main with commit 0c0b14b Jul 11, 2024
21 of 22 checks passed
@RulaKhaled RulaKhaled deleted the public-tests-api branch July 11, 2024 15:15
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