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

chore: Cleanup unused graphql fields - coverageAnalytics #843

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

suejung-sentry
Copy link
Contributor

@suejung-sentry suejung-sentry commented Sep 30, 2024

Remove now-unused GraphQL fields for GraphQL restructure project.

Related to these tickets:

Closes codecov/engineering-team#2282

Tested on staging by confirming no regression after removing these fields

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.25%. Comparing base (2fca394) to head (5a4d047).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #843      +/-   ##
==========================================
- Coverage   96.26%   96.25%   -0.01%     
==========================================
  Files         814      814              
  Lines       18680    18659      -21     
==========================================
- Hits        17982    17961      -21     
  Misses        698      698              
Flag Coverage Δ
unit 92.51% <100.00%> (-0.01%) ⬇️
unit-latest-uploader 92.51% <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.

@codecov-staging
Copy link

codecov-staging bot commented Sep 30, 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!

@suejung-sentry suejung-sentry marked this pull request as ready for review September 30, 2024 17:37
@suejung-sentry suejung-sentry requested a review from a team as a code owner September 30, 2024 17:37
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These tests are now at test_coverage_analytics_measurements.py

@@ -62,31 +60,6 @@ def resolve_oldest_commit_at(
return None


@repository_bindable.field("coverage")
Copy link
Contributor Author

@suejung-sentry suejung-sentry Sep 30, 2024

Choose a reason for hiding this comment

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

These fields are now within the coverageAnalytics type at coverage_analytics.py. Frontend has been cut over with codecov/engineering-team#2281

Copy link
Contributor Author

@suejung-sentry suejung-sentry left a comment

Choose a reason for hiding this comment

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

Note that the type check CI step fails as I did not attempt to convert the repository.py file to include types with this ticket

assert self.fetch_repository(
repo.name,
default_fields
+ "coverageAnalytics { percentCovered commitSha hits misses lines },",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to add the update the default_fields object with this new object instead of removing it and supplementing the query here?

Or would that have meant we needed to update more tests or something

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 thought these fields aren't necessarily "default" as we extend the repository object with more stuff and maybe more product lines into the future. I'd guess net new tests would more likely want to test repository without coverageAnalytics related fields (& those could get tested within the test_coverage_analytics.py area)

Copy link
Contributor

@ajay-sentry ajay-sentry left a comment

Choose a reason for hiding this comment

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

looks good

@suejung-sentry suejung-sentry added this pull request to the merge queue Oct 1, 2024
Merged via the queue into main with commit a4d04bc Oct 1, 2024
32 of 34 checks passed
@suejung-sentry suejung-sentry deleted the sshin/2282 branch October 1, 2024 22:05
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.

[1.3] Clean Up Old API Implementation
2 participants