Skip to content
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

raise specific error when no update was possible #10685

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

brettfo
Copy link
Contributor

@brettfo brettfo commented Sep 26, 2024

When the NuGet updater cannot perform any update, jobs currently fail with unknown_error which comes from here:

raise DependabotError, "FileUpdater failed" unless updated_files.any?

This isn't very descriptive and makes it difficult to investigate the unknown_error bucket, especially since in this case we know exactly what went wrong.

The fix is to add a new error type that represents this scenario and raise it directly in the NuGet updater. This has the benefit of making the call stack more usable.

The error type string update_not_possible is already well-known.

@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Sep 26, 2024
@brettfo brettfo force-pushed the dev/brettfo/nuget-updater-error branch from 521708f to 1a4adbb Compare September 26, 2024 19:22
@brettfo brettfo force-pushed the dev/brettfo/nuget-updater-error branch from 1a4adbb to 93f844d Compare September 26, 2024 19:26
@brettfo brettfo marked this pull request as ready for review September 26, 2024 19:47
@brettfo brettfo requested review from a team as code owners September 26, 2024 19:47
@kbukum1 kbukum1 merged commit 60e6cba into main Sep 26, 2024
148 checks passed
@kbukum1 kbukum1 deleted the dev/brettfo/nuget-updater-error branch September 26, 2024 20:39
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.

5 participants