← 输入框|github.com|刷新
Skip to content

Name the failing request when the pull request overview fails to load - #9126

Draft
Alex Ross (alexr00) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-transient-connect-timeout-issue
Draft

Alex Ross (alexr00) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-transient-connect-timeout-issue

Conversation

Copilot AI commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

A single transient network error (e.g. UND_ERR_CONNECT_TIMEOUT on GET /user) used to break the PR overview until reload. The error shown, Error updating pull request description: …, also didn't say which request had failed.

The two caching root causes from the issue are already fixed on main. This PR addresses the remaining part: the error message.

Already fixed on main (unchanged here)

Changes

  • PullRequestOverviewPanel.updateItemNow: four loads run together (default branch, repository permissions, current user, edit permissions). The existing measure timing helper now also takes a localized label, and a failure is re-thrown with that label:
    measure('currentUser', vscode.l10n.t('Getting the current user'), this._folderRepositoryManager.getCurrentUser(...)),
    // on failure: Error('Getting the current user failed: <cause>')
  • Error message: the surfaced message is now Error loading pull request #<n>: <operation> failed: <cause>, and it is also written to the log. Before, it was the misleading Error updating pull request description.
  • Regression test (pullRequestOverview.test.ts › "loading errors"):
    • Uses the real FolderRepositoryManager → CredentialStore path, with a cast-free hub whose first GET /user times out.
    • Asserts the error message names the current-user request.
    • Asserts that reopening the overview loads with no new error and makes exactly one more GET /user, which checks the retry end to end.

Notes for review

  • In practice the default-branch and permissions loads catch their own errors and fall back. The labels that actually show up are the current-user and edit-permission ones.
  • IssueOverviewPanel.updateItem still reports Error updating issue description for a similar combined load. It's left for a follow-up to keep this PR small.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix transient connect timeout on GET /user breaking PR overview Name the failing request when the pull request overview fails to load Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants