Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix: Allow partial integration results when some providers have authentication failures #4748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
Copilot wants to merge 4 commits into main
base: main
Choose a base branch
Loading
from copilot/fix-integration-error-launchpad

Conversation

Copy link

Copilot AI commented Nov 13, 2025
edited
Loading

Authentication failures in one integration (e.g., Azure DevOps) block all other integrations (e.g., GitHub) from displaying results in Launchpad. This also affects other consumers of getMyPullRequests().

Changes

Modified IntegrationService.getMyPullRequestsCore():

  • Collect successful results first, then errors separately
  • Return successful results if any integration succeeds, even when others fail
  • Only return error when all integrations fail (no partial results available)
  • Handle both promise rejections and error results from integration providers

Before vs After

// Before: Error if ANY integration fails
GitHub:  5 PRs
Azure:  Invalid credentials
 Returns: { error: "Your 'azureDevOps' credentials are invalid or expired" }
// After: Success if ANY integration succeeds 
GitHub:  5 PRs
Azure:  Invalid credentials
 Returns: { value: [5 GitHub PRs] }

This aligns with the existing pattern in getMyIssuesCore() which already handles partial failures gracefully.

Related

Fixes #4731

Original prompt

This section details on the original issue you should resolve

<issue_title>Bad credential of one integration ruins other integrations on Launchpad</issue_title>
<issue_description>## Description

Steps to reproduce

on GitLens v17.3.0

  • Connect GitHub and Azure on GKDev

  • Sync integrations in GitLens

  • Go to Azure OAuth settings and reject the application (keep it connected on GKDev)
    Image

  • Wait for 30min until the azure token expires

  • Open the launchpad

Expected result

You see GitHub PRs

Actual result

You fail seeing any PRs, because of Azure error:

Image

Related issues:

Technical details

It feels like it's here:

private async getMyPullRequestsCore(
integrations: Map<GitHostIntegration, ResourceDescriptor[] | undefined>,
cancellation?: CancellationToken,
silent?: boolean,
): Promise<IntegrationResult<PullRequest[] | undefined>> {
const start = Date.now();
const promises: Promise<IntegrationResult<PullRequest[] | undefined>>[] = [];
for (const [integration, repos] of integrations) {
if (integration == null) continue;
promises.push(integration.searchMyPullRequests(repos, cancellation, silent));
}
const results = await Promise.allSettled(promises);
const errors = [
...filterMap(results, r =>
r.status === 'fulfilled' && r.value?.error != null ? r.value.error : undefined,
),
];
if (errors.length) {
return {
error: errors.length === 1 ? errors[0] : new AggregateError(errors),
duration: Date.now() - start,
};
}
return {
value: [
...flatten(
filterMap(results, r =>
r.status === 'fulfilled' && r.value != null && r.value?.error == null
? r.value.value
: undefined,
),
),
],
duration: Date.now() - start,
};
}

Maybe we should not fail the whole procedure if one of integrations fails?

GitLens Version

17.3.0

VS Code Version

No response

Git Version

No response

Logs, Screenshots, Screen Captures, etc

No response</issue_description>

<agent_instructions>This tasks describes authentication problems in one provider that can affect displaying results of other providers. The solution should also mitigate the case when problems in parsing/forming result of one provider should not block other providers on the Launchpad.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title (削除) [WIP] Fix integration error due to bad Azure credentials (削除ここまで) (追記) Fix: Allow partial integration results when some providers have authentication failures (追記ここまで) Nov 13, 2025
Copilot AI requested a review from sergeibbb November 13, 2025 13:47
Copilot finished work on behalf of sergeibbb November 13, 2025 13:47
sergeibbb added a commit that referenced this pull request Nov 13, 2025
Updates integration result handling to return an error only if all integration calls fail, allowing partial successes to be returned even when some calls encounter errors.
Improves resilience and user feedback by ensuring that failures in some integrations do not prevent successful results from being delivered.
(#4492, #4748)
@sergeibbb sergeibbb force-pushed the copilot/fix-integration-error-launchpad branch from a154fa5 to 914781c Compare November 13, 2025 14:31
@sergeibbb sergeibbb removed their request for review November 13, 2025 14:31
sergeibbb added a commit that referenced this pull request Nov 17, 2025
Shows the error on Launchpad anong with PRs.
(#4748, #4492)
sergeibbb added a commit that referenced this pull request Nov 17, 2025
Shows the error on Launchpad anong with PRs.
(#4748, #4492)
sergeibbb added a commit that referenced this pull request Nov 17, 2025
Enhances the launchpad error display by detecting authentication errors and providing a clearer, actionable message with options to reconnect integrations directly from the UI. Aggregates multiple errors to surface the most relevant cause and streamlines error item creation for consistency.
Improves user experience by making it easier to resolve integration authentication issues.
(#4492, #4748)
Updates integration result handling to return an error only if all integration calls fail, allowing partial successes to be returned even when some calls encounter errors.
Improves resilience and user feedback by ensuring that failures in some integrations do not prevent successful results from being delivered.
(#4492, #4748)
Shows the error on Launchpad anong with PRs.
(#4748, #4492)
Enhances the launchpad error display by detecting authentication errors and providing a clearer, actionable message with options to reconnect integrations directly from the UI. Aggregates multiple errors to surface the most relevant cause and streamlines error item creation for consistency.
Improves user experience by making it easier to resolve integration authentication issues.
(#4492, #4748)
@sergeibbb sergeibbb force-pushed the copilot/fix-integration-error-launchpad branch from d4f9c6d to 75d7275 Compare November 17, 2025 13:46
sergeibbb added a commit that referenced this pull request Nov 18, 2025
(#4492, #4748)
Introduces a "Show Output Channel" command accessible via command palette and context menus, with appropriate icons and menu placements. Enhances the Launchpad view to display actionable error messages, distinguishing authentication errors from general failures, and adds context-specific actions for resolving them. Improves user experience by making error states more visible and easier to address directly from the UI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Launchpad does not show Gyo's PRs Bad credential of one integration ruins other integrations on Launchpad

2 participants

AltStyle によって変換されたページ (->オリジナル) /