Skip to content

[Bug]: Pull requests don't load on GitHub Enterprise Server 3.9: queries use fields its schema doesn't have #35213

Open

Description

@josham

Area

packages/source-control-github

Steps to reproduce

  1. Run T3 Code 0.1.9 stable with a project whose remote is on GitHub Enterprise Server 3.9.0, with gh authenticated to that host.
  2. Open the Pull Requests side panel, or link a pull request from that host.

Expected behavior

Pull requests list and open. Where the server's schema lacks a newer field, T3 leaves that data out.

Actual behavior

No pull requests show in the side panel, and a linked PR's header, detail, activity and review guide all fail. GitHub rejects the whole GraphQL document whenever it names one field the schema doesn't have, even behind @include(if: false), because validation runs before execution.

The background sync alone (PullRequestSyncReactor.sweep → getPullRequestSummary) failed 2,937 times in 58 minutes, about 50 requests a minute against the Enterprise server, and none succeeded.

Errors from the server trace, by operation:

Operation Error
summary (getPullRequestSummary, sync and header) Field 'isMinimized' doesn't exist on type 'PullRequestReview'; Field 'stack' doesn't exist on type 'PullRequest'; Field 'stackEntry' doesn't exist on type 'PullRequest'
activity (getPullRequestActivity → readActivityPage) Field 'isMinimized' doesn't exist on type 'PullRequestReview'
detail (PullRequestCore / readRequestedReviewers), and the review guide that uses it Field 'mergeStateStatus' doesn't exist on type 'PullRequest'; Fragment on Bot can't be spread inside RequestedReviewer

File stats (readPages) worked.

Cause

The documents in packages/source-control-github/src/server/*.graphql on main (f419698aea) select fields that GHES 3.9.0's schema doesn't have:

Missing on 3.9.0 Selected in Introduced by
PullRequest.stack, PullRequest.stackEntry listings, summary #19224 (#20436; #31184 is the open fix)
PullRequestReview.isMinimized listings, summary, PullRequestActivity, ReviewThreads #33134
PullRequest.mergeStateStatus PullRequestCore, PullRequestActionState
Bot in the RequestedReviewer union PullRequestCore, ReviewerCandidates, ReviewThreads
PullRequest.viewerCanUpdateBranch, Ref.compare PullRequestCore, PullRequestActionState (reported in #17232, still present)

Introspection on 3.9.0 confirms the isMinimized case: Minimizable is implemented by CommitComment, DiscussionComment, GistComment, IssueComment and PullRequestReviewComment, not PullRequestReview. Comments and inline review-thread comments keep working.

#31184 fixes only the stack fields, so on 3.9.0 the panel would still fail after it merges.

Question

Which GHES versions should T3 support? 3.9 is past GitHub's support window, so this may be out of scope. If it is in scope, the patch-per-field approach (#31184) would need repeating for each row above. A more durable option is to check once per host which of these fields its schema has (one introspection query, cached) and choose documents to match, so newer GHES keeps every feature.

I can send a PR for whichever approach you prefer, after #31184 lands, and verify it against a 3.9.0 server.

Version or commit

T3 Code 0.1.9 stable; checked against main at f419698aea.

Environment

GitHub Enterprise Server 3.9.0, gh authenticated to the host.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions