Repository navigation
Fix Dependabot nuget scan timeout with exclude-paths - #68171
Merged
wtgodbe merged 1 commit intoAug 3, 2026
Merged
Conversation
The dynamic Dependabot nuget-updater job (dynamic/dependabot/dependabot-updates) has been timing out/getting cancelled on every run since dotnet#68012 merged (e.g. https://github.com/dotnet/aspnetcore/actions/runs/30814186376), hitting an internal ~55 minute job cap enforced by GitHub's Dependabot service. The job performs an individual "single restore" per discovered .csproj file under the scanned directories (~11.8s/project observed). The repo has 600+ .csproj files, but only 26 of them have any explicit PackageReference Version="..." attribute - the rest resolve versions indirectly via Directory.Build.props/Dependencies.props (LatestPackageReference) or reference in-repo shared-framework assemblies, so scanning them adds restore time without adding anything Dependabot can act on. Exclude test/sample/benchmark/perf trees, which account for the bulk of the low-value scans, bringing the scanned project count from 618 down to ~219 (~43 min estimated restore time, comfortably under the cap). The excluded csproj files that do have explicit package versions (e.g. src/Mvc/perf/benchmarkapps/BasicApi, IIS.NewHandler.FunctionalTests, InProcessNewShimWebSite) are intentionally pinned to old versions for legacy/back-compat testing and shouldn't be bumped by Dependabot anyway. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the repository’s Dependabot NuGet configuration to avoid GitHub Dependabot job timeouts by excluding low-value project trees from NuGet discovery/restores, keeping Dependabot runs within the service’s fixed time cap.
Changes:
- Added
exclude-pathsto the NuGet Dependabot update entry to skip scanning/restoring projects under common test/sample/perf/benchmark directories. - Documented (in-file) why the exclusions are necessary and what problem they address.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Dependabot nuget-updater job (GitHub's dynamic
dependabot/dependabot-updatesworkflow) has been timing out on every run since #68012 merged, e.g. https://github.com/dotnet/aspnetcore/actions/runs/30814186376. It hits an internal ~55 minute job cap enforced by GitHub's Dependabot service (not configurable via workflow/dependabot.yml).Root cause
Dependabot performs an individual "single restore" per discovered
.csprojfile under the scanned directories (/and/eng/tools/DependabotDiscovery), at ~11.8s/project. The repo has 600+.csprojfiles, but only 26 of them contain any explicitPackageReference ... Version="..."attribute -- the rest resolve versions indirectly viaDirectory.Build.props/Dependencies.props(LatestPackageReference) or reference in-repo shared-framework assemblies. Scanning those adds restore time without adding anything Dependabot can actually act on.Fix
Add
exclude-paths(GA since Aug 2025) to skip manifest parsing/restoring fortest/tests/*.Tests/*.FunctionalTests/sample/samples/testassets/perf/benchmark*trees, which account for the bulk of low-value scans. This brings the scanned project count from 618 down to ~219 (~43 min estimated restore time, comfortably under the ~55 min cap).The handful of excluded
.csprojfiles that do have explicit package versions (e.g.src/Mvc/perf/benchmarkapps/BasicApi,IIS.NewHandler.FunctionalTests,InProcessNewShimWebSite) are intentionally pinned to old versions for legacy/back-compat testing and shouldn't be bumped by Dependabot anyway.Testing
Validated the resulting YAML parses correctly. Modeled the exclude patterns against the full list of 618
.csprojpaths in the repo to confirm the impact and estimate the new restore-time budget.