codecov / codecov-api

Code for the API of Codecov
Other
216 stars 30 forks source link

Remove old REST repo endpoints and update new GQL mutations #680

Closed rohitvinnakota-codecov closed 3 months ago

rohitvinnakota-codecov commented 3 months ago

Purpose/Motivation

What is the feature? Why is this being done?

This PR removes old REST endpoints for

It also contains a fix to an edge case to update viewable repositories so the UI can see all repos in the org, not just those authored by the logged in user.

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[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:white_check_mark: All tests successful. No failed tests found.

:loudspeaker: Thoughts on this report? Let us know!

codecov-qa[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.61%. Comparing base (3a392e8) to head (f181173).

:white_check_mark: All tests successful. No failed tests found.

@@            Coverage Diff             @@
##             main     #680      +/-   ##
==========================================
- Coverage   91.63%   91.61%   -0.03%     
==========================================
  Files         629      628       -1     
  Lines       16745    16714      -31     
==========================================
- Hits        15344    15312      -32     
- Misses       1401     1402       +1     
Flag Coverage Δ
unit 91.61% <100.00%> (-0.03%) :arrow_down:
unit-latest-uploader 91.61% <100.00%> (-0.03%) :arrow_down:

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

Files Coverage Δ
api/internal/repo/views.py 100.00% <100.00%> (ø)
...nds/repository/interactors/encode_secret_string.py 100.00% <100.00%> (ø)
.../interactors/regenerate_repository_upload_token.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

codecov-public-qa[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.61%. Comparing base (3a392e8) to head (f181173).

:white_check_mark: All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #680      +/-   ##
==========================================
- Coverage   91.63%   91.61%   -0.03%     
==========================================
  Files         629      628       -1     
  Lines       16745    16714      -31     
==========================================
- Hits        15344    15312      -32     
- Misses       1401     1402       +1     
Flag Coverage Δ
unit 91.61% <100.00%> (-0.03%) :arrow_down:
unit-latest-uploader 91.61% <100.00%> (-0.03%) :arrow_down:

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

Files Coverage Δ
api/internal/repo/views.py 100.00% <100.00%> (ø)
...nds/repository/interactors/encode_secret_string.py 100.00% <100.00%> (ø)
.../interactors/regenerate_repository_upload_token.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Impacted file tree graph

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.95%. Comparing base (3a392e8) to head (f181173).

:white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #680 +/- ## ================================================ - Coverage 95.96000 95.95000 -0.01000 ================================================ Files 808 808 Lines 18077 18051 -26 ================================================ - Hits 17347 17321 -26 Misses 730 730 ``` | [Flag](https://app.codecov.io/gh/codecov/codecov-api/pull/680/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/codecov/codecov-api/pull/680/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `91.61% <100.00%> (-0.03%)` | :arrow_down: | | [unit-latest-uploader](https://app.codecov.io/gh/codecov/codecov-api/pull/680/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `91.61% <100.00%> (-0.03%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rohitvinnakota-codecov commented 3 months ago

These delete endpoints are not called anywhere right, like all the cloud and self hosted apps?

Yeah, verified here they are no longer in use

https://codecov.sentry.io/performance/summary/?project=5215654&query=http.method%3APATCH&referrer=performance-transaction-summary&statsPeriod=30d&transaction=%2Finternal%2F%7Bservice%7D%2F%7Bowner_username%7D%2Frepos%2F%7Brepo_name%7D%2Ferase%2F&unselectedSeries=p100%28%29&unselectedSeries=avg%28%29