github / github/app

PR detail view fails on GitHub Enterprise when checkSuite.app returns partial GraphQL errors

Đang mở
#2,951 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
2.1k
Fork
153
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Short summary

PRs render briefly, then switch to a generic load error because recoverable GraphQL errors for optional check-suite app metadata are treated as fatal.

### Affected version or release

GitHub Copilot app 1.1.10

### Installation context

Windows desktop app; GitHub Enterprise account; WebView2 151.0.4129.93

### What happened?

Opening a pull request in the GitHub Copilot app initially renders the PR, but after roughly 5-10 seconds the view is replaced by:

> We couldn't load this pull request. Please try again.

The local authenticated WebSocket remains connected and continues delivering events. The failure occurs during the full `pull_request_full` resource refresh.

REST PR endpoints and a minimal GraphQL PR query both succeed using the app's stored Enterprise credential. The failing checks query receives HTTP 200 with usable partial PR/check data plus `Not Found` errors for optional check-suite app metadata. The app treats those partial errors as a fatal resource failure and replaces the loaded PR with the generic error screen.

This reproduced across multiple private repositories and pull requests on the Enterprise host.

### Steps to reproduce

1. Sign in to the Copilot app with a GitHub Enterprise account.
2. Open a pull request with status checks from the app inbox / My Work.
3. Wait approximately 5-10 seconds for the full PR resource refresh.
4. Observe that the initially rendered PR is replaced by the generic load-error screen.

### Expected behavior

The pull request should remain usable. Failure to resolve optional `CheckSuite.app` metadata should be represented as unavailable metadata, not make the entire pull request resource fail.

### Additional context

The app's embedded `GitHubCopilotAppPullRequestChecksPage` query requests optional metadata under both check-suite paths:

```graphql
checkSuite {
app {
name
logoUrl
}
}
```

The GraphQL response contains `Not Found` errors at paths shaped like:

```text
repository.pullRequest.statusCheckRollup.contexts.nodes[*].checkSuite.app
repository.pullRequest.commits.nodes[0].commit.checkSuites.nodes[*].app
```

The app then logs this sequence:

1. `Failed to fetch progressive pull request checks page`
2. `Failed to fetch public GraphQL pull request detail summary; trying summary-only fallback`
3. `Failed to fetch resource snapshot ... stage="github_api"`

A/B confirmation using the app credential:

- Embedded checks query: 8 partial GraphQL `Not Found` errors.
- Same query with only the optional `checkSuite.app` selections removed: 0 errors, PR loaded, all 9 check contexts returned.
- Basic REST and GraphQL PR requests succeed, so this is not a general authentication or WebSocket transport failure.

Potential fixes:

- Accept partial GraphQL data and leave inaccessible `CheckSuite.app` values unavailable.
- Omit the optional selection where unsupported or inaccessible.
- Fall back to REST/check data while preserving the loaded PR view.

Workaround: open the pull request in a browser.

Raw logs and private repository identifiers are intentionally omitted.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start at the GitHubCopilotAppPullRequestChecksPage query and the pull_request_full refresh path; inspect how partial GraphQL errors are classified after the optional checkSuite.app selections. Reproduce with the Enterprise PR scenario and verify the PR remains usable when those metadata fields return Not Found while check data still loads.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github, graphql
Lĩnh vực
api, desktop
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
52/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.