Skip to content

fix(graphql): allow sha argument on CommitCoverageAnalytics.coverageFile - #2204

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/graphql-coverage-file-sha
Open

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/graphql-coverage-file-sha

Conversation

@sentry

@sentry sentry Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

An external client was sending a sha argument to the CommitCoverageAnalytics.coverageFile GraphQL field, which resulted in a GraphQLError because the argument was not defined in the schema. The sha argument is redundant as the commit context is already established by the parent resolver.

This fix updates the GraphQL schema to include sha: String as an optional argument for CommitCoverageAnalytics.coverageFile and modifies the resolver to accept this argument. The sha value is then silently ignored, preventing the GraphQLError for clients sending this redundant argument.

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-F0A

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

@thomasrockhu-codecov

thomasrockhu-codecov commented Sep 6, 2026 •

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

✅ Risk: LOW

This PR adds an optional sha: String argument to the CommitCoverageAnalytics.coverageFile GraphQL field and its resolver, accepting the argument and silently ignoring it so external clients that send a redundant sha no longer trigger a GraphQLError. The schema and resolver changes are consistent (sha=None keyword matches the new optional schema arg), and the ignored-value behaviour matches the PR description. No issues found above the confidence threshold.

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.63%. Comparing base (17e0f08) to head (a132a77).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2204   +/-   ##
=======================================
  Coverage   91.63%   91.63%           
=======================================
  Files        1337     1337           
  Lines       53262    53262           
  Branches     1647     1647           
=======================================
  Hits        48805    48805           
  Misses       4136     4136           
  Partials      321      321           
Flag Coverage Δ
apiunit 93.98% <100.00%> (ø)

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

Copy link
Copy Markdown

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!

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

This branch has not been deployed

No deployments
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