Skip to content

Catch FatalProtocolException from source repository initialization#15117

Merged
brettfo merged 1 commit into
mainfrom
dev/brettfo/nuget-feed-timeout
May 22, 2026
Merged

Catch FatalProtocolException from source repository initialization#15117
brettfo merged 1 commit into
mainfrom
dev/brettfo/nuget-feed-timeout

Conversation

@brettfo
Copy link
Copy Markdown
Contributor

@brettfo brettfo commented May 22, 2026

Move sourceRepository and GetResourceAsync calls inside the existing try/catch block in CompatabilityChecker.cs so that FatalProtocolException thrown during feed resolution is handled the same as failures during DoesPackageExistAsync.

@brettfo brettfo requested a review from a team as a code owner May 22, 2026 16:51
Copilot AI review requested due to automatic review settings May 22, 2026 16:51
@github-actions github-actions Bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label May 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the NuGet helper’s CompatibilityChecker.DownloadPackageAsync flow so FatalProtocolException thrown during source repository initialization / resource acquisition is handled consistently with failures during DoesPackageExistAsync, avoiding hard failures when a feed is non-compliant or unreachable.

Changes:

  • Moves Repository.Factory.GetCoreV3(source) and GetResourceAsync<FindPackageByIdResource>() inside the existing try/catch (FatalProtocolException) block.
  • Keeps the existing “skip this source on fatal protocol issues” behavior aligned across feed resolution and existence checks.
Show a summary per file
File Description
nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/CompatabilityChecker.cs Wraps source repository + resource acquisition in FatalProtocolException handling while iterating package sources.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/CompatabilityChecker.cs Outdated
@brettfo brettfo force-pushed the dev/brettfo/nuget-feed-timeout branch from 5d51c9a to dfd8ac0 Compare May 22, 2026 17:03
Move sourceRepository and GetResourceAsync calls inside the existing
try/catch block so that FatalProtocolException thrown during feed
resolution is handled the same as failures during DoesPackageExistAsync.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@brettfo brettfo force-pushed the dev/brettfo/nuget-feed-timeout branch from dfd8ac0 to 8276910 Compare May 22, 2026 21:24
@brettfo brettfo merged commit bd8cad7 into main May 22, 2026
139 of 140 checks passed
@brettfo brettfo deleted the dev/brettfo/nuget-feed-timeout branch May 22, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: dotnet:nuget NuGet packages via nuget or dotnet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants