Skip to content

fix: Remove unused $isTeamPlan variable from PullPageData query#4006

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/remove-is-team-plan-graphql-var
Open

fix: Remove unused $isTeamPlan variable from PullPageData query#4006
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/remove-is-team-plan-graphql-var

Conversation

@sentry

@sentry sentry Bot commented Jun 23, 2026

Copy link
Copy Markdown

Description

This PR addresses the GraphQLError: Variable '$isTeamPlan' is never used in operation 'PullPageData'. This error occurred because an older, cached version of the frontend's PullPageData GraphQL query declared the $isTeamPlan variable but did not use it in the query body, violating GraphQL validation rules and causing the API to reject the request.

Code Example

N/A - No specific code example is provided in the description, but changes were made in src/pages/PullRequestPage/queries/PullPageDataQueryOpts.tsx, PullCoverage.tsx, PullRequestPage.tsx, and PullBundleAnalysis.tsx.

Notable Changes

  • The $isTeamPlan variable and all related logic have been removed from the PullPageData query in src/pages/PullRequestPage/queries/PullPageDataQueryOpts.tsx.
  • The fields previously conditionally skipped based on $isTeamPlan are now always fetched. This simplifies the query, eliminates the potential for variable declaration/usage mismatches, and prevents validation errors from clients sending older query versions.
  • Corresponding updates were made to callers in PullCoverage.tsx, PullRequestPage.tsx, and PullBundleAnalysis.tsx to remove the now-unnecessary isTeamPlan prop and related logic.

Screenshots

N/A

Link to Sample Entry

N/A

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

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
5743 1 5742 3
View the top 1 failed test(s) by shortest run time
src/pages/PullRequestPage/queries/PullPageDataQueryOpts.test.tsx > PullPageDataQueryOpts > calling hook > user on team plan > returns the correct subset of data
Stack Traces | 1.02s run time
AssertionError: expected { pull: { pullId: 1, …(4) }, …(2) } to strictly equal { coverageEnabled: true, …(2) }

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected
+ Received

  Object {
    "bundleAnalysisEnabled": true,
    "coverageEnabled": true,
    "pull": Object {
      "bundleAnalysisCompareWithBase": Object {
        "__typename": "BundleAnalysisComparison",
      },
      "commits": Object {
        "totalCount": 11,
      },
      "compareWithBase": Object {
        "__typename": "Comparison",
+       "componentComparisonsCount": 6,
        "directChangedFilesCount": 0,
+       "flagComparisonsCount": 1,
        "impactedFilesCount": 4,
+       "indirectChangedFilesCount": 0,
      },
      "head": Object {
        "bundleAnalysis": Object {
          "bundleAnalysisReport": Object {
            "__typename": "BundleAnalysisReport",
            "isCached": false,
          },
        },
        "commitid": "123",
      },
      "pullId": 1,
    },
  }

 ❯ .../PullRequestPage/queries/PullPageDataQueryOpts.test.tsx:396:39
 ❯ runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12
 ❯ checkCallback node_modules/@.../dom/dist/wait-for.js:124:77
 ❯ Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16

@codecov-public-qa

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
5743 1 5742 3
View the top 1 failed test(s) by shortest run time
src/pages/PullRequestPage/queries/PullPageDataQueryOpts.test.tsx > PullPageDataQueryOpts > calling hook > user on team plan > returns the correct subset of data
Stack Traces | 1.02s run time
AssertionError: expected { pull: { pullId: 1, …(4) }, …(2) } to strictly equal { coverageEnabled: true, …(2) }

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected
+ Received

  Object {
    "bundleAnalysisEnabled": true,
    "coverageEnabled": true,
    "pull": Object {
      "bundleAnalysisCompareWithBase": Object {
        "__typename": "BundleAnalysisComparison",
      },
      "commits": Object {
        "totalCount": 11,
      },
      "compareWithBase": Object {
        "__typename": "Comparison",
+       "componentComparisonsCount": 6,
        "directChangedFilesCount": 0,
+       "flagComparisonsCount": 1,
        "impactedFilesCount": 4,
+       "indirectChangedFilesCount": 0,
      },
      "head": Object {
        "bundleAnalysis": Object {
          "bundleAnalysisReport": Object {
            "__typename": "BundleAnalysisReport",
            "isCached": false,
          },
        },
        "commitid": "123",
      },
      "pullId": 1,
    },
  }

 ❯ .../PullRequestPage/queries/PullPageDataQueryOpts.test.tsx:396:39runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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