Skip to content

fix(graphql): re-add deprecated isCriticalFile to PathContentFile - #2228

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/graphql-iscriticalfile-deprecated
Open

fix(graphql): re-add deprecated isCriticalFile to PathContentFile#2228
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/graphql-iscriticalfile-deprecated

Conversation

@sentry

@sentry sentry Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The issue API-F13 reported a GraphQLError: Cannot query field 'isCriticalFile' on type 'PathContentFile'. This error occurred because the isCriticalFile field was removed from the PathContentFile GraphQL type in PR #1188 on 2025-03-03 as part of removing Impact Analysis. However, an external, unauthenticated client was still querying this field, leading to a schema validation error.

To resolve this breaking change for existing consumers, this PR re-adds the isCriticalFile field to the PathContentFile type in the GraphQL schema. It is marked as @deprecated with a clear reason, and its resolver is implemented to always return False, as the underlying Impact Analysis feature no longer exists. This ensures backward compatibility and prevents the GraphQLError for clients still querying this field.

Legal Boilerplate

Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness 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 Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.

Fixes API-F13

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@thomasrockhu-codecov

thomasrockhu-codecov commented Sep 10, 2026

Copy link
Copy Markdown
Contributor
✨ Harness AI Code Review View in Harness →

Risk: LOW

This PR re-adds the deprecated isCriticalFile field to the PathContentFile GraphQL type to fix a GraphQLError for external clients still querying it (API-F13). The schema change is marked @deprecated, and the resolver constantly returns False since Impact Analysis was removed. The change is correctly wired: path_content_file_bindable (ObjectType("PathContentFile")) is defined, exported from path_contents/__init__.py, and already present in the bindables list passed to schema construction, so the new resolver is registered.

No issues found above the confidence threshold.

@codecov-notifications

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
...pi/graphql_api/types/path_contents/path_content.py 66.66% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (66.66%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

📢 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.

@sentry

sentry Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Seer needs additional GitHub permissions

Seer wants to keep iterating on this pull request to get CI passing, but the Sentry GitHub App installation is missing permissions it needs to read the failing checks and push a fix.

Review and accept the updated permissions to let Seer continue: https://github.com/organizations/codecov/settings/installations/86101127/permissions/update

@codecov

codecov Bot commented Sep 10, 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.63%. Comparing base (17e0f08) to head (7c328ac).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...pi/graphql_api/types/path_contents/path_content.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2228      +/-   ##
==========================================
- Coverage   91.63%   91.63%   -0.01%     
==========================================
  Files        1337     1337              
  Lines       53262    53265       +3     
  Branches     1647     1647              
==========================================
+ Hits        48805    48807       +2     
- Misses       4136     4137       +1     
  Partials      321      321              
Flag Coverage Δ
apiunit 93.97% <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.

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 participant