Skip to content

fix(graphql): add hasUncoveredLines filter to ImpactedFilesFilters#1217

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/api-ecc-uncovered-lines
Open

fix(graphql): add hasUncoveredLines filter to ImpactedFilesFilters#1217
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/api-ecc-uncovered-lines

Conversation

@sentry

@sentry sentry Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

This PR resolves the GraphQLError: Field 'hasUncoveredLines' is not defined by type 'ImpactedFilesFilters'. issue (API-ECC).

The root cause was that an external client was querying the GraphQL API with a hasUncoveredLines filter on impactedFiles, but this field was not defined in the ImpactedFilesFilters input type in the GraphQL schema.

Changes made:

  1. Added hasUncoveredLines: Boolean to the ImpactedFilesFilters input type in apps/codecov-api/graphql_api/types/inputs/impacted_files_filters.graphql.
  2. Implemented the filtering logic in FetchImpactedFiles.execute() in apps/codecov-api/compare/commands/compare/interactors/fetch_impacted_files.py. When hasUncoveredLines is true, the impacted files are filtered to only include those with misses_count > 0.

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.

Fixes API-ECC

@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.89%. Comparing base (7b60783) to head (dd9aefc).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...mmands/compare/interactors/fetch_impacted_files.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1217      +/-   ##
==========================================
- Coverage   91.89%   91.89%   -0.01%     
==========================================
  Files        1325     1325              
  Lines       50862    50865       +3     
  Branches     1626     1626              
==========================================
+ Hits        46741    46743       +2     
- Misses       3815     3816       +1     
  Partials      306      306              
Flag Coverage Δ
apiunit 94.94% <66.66%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@codecov-notifications

codecov-notifications Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...mmands/compare/interactors/fetch_impacted_files.py 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

0 participants