Repository navigation
Configure Dependabot to update NuGet dependencies not automated by Maestro - #68012
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates this repo’s Dependabot configuration to re-enable and scope NuGet dependency update PRs (for dependencies not already handled by Maestro/VMR flow), across main and supported release branches.
Changes:
- Adds a
dotnet-publicNuGet registry entry and wires it into NuGet update checks. - Replaces the previously-disabled NuGet updater with 4 branch-targeted NuGet update entries (weekly, staggered days;
mainminor/patch only, release branches patch only). - Adds extensive ignore lists to prevent Dependabot from proposing updates for Maestro-managed dependencies and IdentityModel packages pinned via
eng/Versions.props.
Comments suppressed due to low confidence (2)
.github/dependabot.yml:286
- The commit-message prefix for this release branch is missing the trailing space that other entries in this file use. Without it, the generated commit subject typically ends up as "[release/9.0]Bump …".
commit-message:
prefix: "[release/9.0]"
.github/dependabot.yml:414
- The commit-message prefix for this release branch is missing the trailing space that other entries in this file use. Without it, the generated commit subject typically ends up as "[release/8.0]Bump …".
commit-message:
prefix: "[release/8.0]"
wtgodbe
force-pushed
the
wtgodbe/dependabot-nuget
branch
from
July 24, 2026 20:17
64960cc to
376cfec
Compare
…estro Fleshes out the previously-disabled nuget entry in .github/dependabot.yml into four fully-configured entries (main, release/10.0, release/9.0, release/8.0), modeled on dotnet/efcore's dependabot.yml, so Dependabot keeps NuGet packages that aren't already flowed in by darc/Maestro up to date and free of known vulnerabilities. - Weekly schedule (staggered by branch), no cap on open PRs (open-pull-requests-limit: 999 - Dependabot has no literal "unlimited" setting), and a 7-day cooldown on all updates before Dependabot will open a PR for a new version. - main allows minor and patch updates; release branches are limited to patch-only, consistent with each branch's stability expectations. - Registers the dotnet-public NuGet feed (matching NuGet.config) so Dependabot resolves packages the same way our build does. - Ignores every package name that appears as a <Dependency> in that branch's eng/Version.Details.xml, since those are already kept current by Maestro dependency flow / VMR codeflow and would otherwise conflict with darc-managed PRs. - Also ignores the four Microsoft.IdentityModel.*/System.IdentityModel.* packages whose version is pinned centrally via the shared $(IdentityModelVersion) property in eng/Versions.props. Co-authored-by: Copilot <[email protected]>
wtgodbe
force-pushed
the
wtgodbe/dependabot-nuget
branch
from
July 24, 2026 20:18
376cfec to
975e74f
Compare
wtgodbe
marked this pull request as draft
July 24, 2026 20:31
…ckages
Most projects declare external packages via <Reference Include="X" />
(see docs/ReferenceResolution.md), an indirection Dependabot's MSBuild-based
NuGet discovery can't see through, so ~90 real dependencies were invisible
to it. eng/tools/DependabotDiscovery/DependabotDiscovery.csproj restates
those packages as ordinary <PackageReference> items using the same
eng/Versions.props properties, so Dependabot can find and bump them without
changing how any real project resolves its dependencies.
- Never built/packed/signed: not in AspNetCore.slnx, nothing globs
eng/tools/** into the real build.
- Excludes Maestro-managed and IdentityModel-pinned packages (handled by
other automation), in-repo ProjectReferenceProvider mappings, vestigial
eng/Dependencies.props entries with no resolvable version, and two
packages dependabot-core itself can never treat as updatable regardless
of how they're declared (NETStandard.Library, PublicApiAnalyzers).
- CodeCheck.ps1 now fails if eng/Dependencies.props changes without a
matching update to this file.
- .github/dependabot.yml gets a second nuget directory entry for this
project.
- docs/ReferenceResolution.md documents the new step for adding packages.
- Directory.Build.props/targets: skip importing the build-time-generated
artifacts/bin/GenerateFiles/Directory.Build.{props,targets} when
DEPENDABOT_NATIVE_HELPERS_PATH is set (set in Dependabot's own NuGet job
containers. Those files never exist under Dependabot's un-built clone,
which otherwise breaks MSBuild evaluation repo-wide under Dependabot;
this has no effect on normal builds/CI.
Verified end-to-end against dependabot-core's real DiscoveryWorker built
from source: all 93 packages are discovered as top-level, updatable
dependencies with correctly-resolved versions.
Co-authored-by: Copilot <[email protected]>
EOF
)
The release/10.0, 9.0, 8.0 nuget entries only scan directory: "/", which (like main before DependabotDiscovery.csproj) can't see most real dependencies since they're referenced via <Reference>, not <PackageReference>. Remove them for now; re-add once the discovery project is ported to release branches. Group main's nuget updates by package-name prefix so related packages (e.g. all Grpc.*, all System.*) are proposed in a single PR instead of one per package. Anything not matched by a group still gets its own PR. Co-authored-by: Copilot <[email protected]>
…ackage in README Move detailed rationale out of the csproj header into README.md, and add an 'Adding a package' section covering the restore-then-fix-TFM workflow (NU1202 -> TFM-conditioned ItemGroup, NU1101 -> feed mirroring). Co-authored-by: Copilot <[email protected]>
wtgodbe
marked this pull request as ready for review
July 24, 2026 23:22
akoeplinger
approved these changes
Jul 27, 2026
wtgodbe
added a commit
that referenced
this pull request
Jul 30, 2026
…nges (#68097) * Only require DependabotDiscovery.csproj update for non-Maestro dependency changes The CodeCheck added in #68012 flagged any add/remove in eng/Dependencies.props as requiring a matching update to eng/tools/DependabotDiscovery/DependabotDiscovery.csproj. This incorrectly fires when a Maestro-managed package is renamed (as in #68014), since that shows up as one add + one remove even though DependabotDiscovery.csproj never referenced it (Maestro-managed packages are excluded, see the project's README). Now the check compares the set of <LatestPackageReference Include="..." /> names before/after and only requires a DependabotDiscovery.csproj update when an added or removed package has no matching version property in eng/Version.Details.props (i.e. isn't managed by Maestro). Co-authored-by: Copilot <[email protected]> * Address PR review feedback: fix regex, avoid fragile array-return pattern, cover all DependabotDiscovery exclusion categories Copilot's automated review on #68097 caught two real bugs: - The Include="..." regex only matched self-closing tags with no other attributes, silently missing entries like <LatestPackageReference Include="xunit.v3" Version="$(XunitV3Version)" />. Fixed with a regex that tolerates any attributes/tag layout, and now joins file content into one string so a tag split across lines is still matched. - 'return , $x' combined with inconsistent @(...) wrapping at call sites caused double array-wrapping in some paths, silently shrinking the Maestro-managed-properties set from ~440 entries to 1-2. Removed the comma-trick entirely; every call site now consistently wraps in @(...). Additionally, two independent review agents pointed out that eng/tools/DependabotDiscovery/README.md documents more exclusion categories than just Maestro: packages pinned via the shared $(IdentityModelVersion) property, packages mapped to an in-repo project via ProjectReferenceProvider (eng/ProjectReferences.props), and two hard-coded packages (NETStandard.Library, Microsoft.CodeAnalysis.PublicApiAnalyzers). The check now recognizes all of these, matching the original error message's intent ('isn't managed by Maestro or the shared $(IdentityModelVersion) property'). Verified end-to-end in isolated worktrees against the real repo history: - PR #68014's actual rename (Maestro-managed) - passes - A synthetic new, non-excluded package addition - still fails as expected - A full IdentityModel-managed rename (Dependencies.props + Versions.props) - passes - A ProjectReferenceProvider-mapped name - passes - The hard-coded NETStandard.Library exclusion - passes Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Will Godbe <[email protected]> Co-authored-by: Copilot <[email protected]>
wtgodbe
added a commit
that referenced
this pull request
Aug 3, 2026
) The dynamic Dependabot nuget-updater job (dynamic/dependabot/dependabot-updates) has been timing out/getting cancelled on every run since #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: Will Godbe <[email protected]> Co-authored-by: Copilot <[email protected]>
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.
Fleshes out the previously-disabled
nugetentry in.github/dependabot.ymlformain, modeled on efcore's dependabot.yml. Previouslyopen-pull-requests-limit: 0disabled version-update PRs entirely.open-pull-requests-limit: 10cooldown: default-days: 7(ref)dotnet-publicfeed (matchesNuGet.config)<Dependency>ineng/Version.Details.xml(already handled by Maestro/VMR codeflow) plus the 4 IdentityModel packages pinned via$(IdentityModelVersion)Grpc.*,System.*,Microsoft.Extensions.*, etc., 20 groups total) so related packages land in one PR instead of many; anything unmatched still gets its own PRrelease/10.0,release/9.0,release/8.0entries were removed - see follow-up below.github-actions/gitsubmoduleentries are unchanged.Discovery project (main only, for now)
Most projects declare external packages via
<Reference Include="X" />rather than<PackageReference>(seedocs/ReferenceResolution.md), an indirection Dependabot's MSBuild-based NuGet discovery can't see through - so ~90 real dependencies were still invisible to it even with the config above. Addseng/tools/DependabotDiscovery/DependabotDiscovery.csproj, which restates those packages as ordinary<PackageReference>items using the sameeng/Versions.propsproperties, so Dependabot can find and bump them without changing how any real project resolves its dependencies. It's never built, packed, or signed - see the file header and itsREADME.mdfor the full exclusion rules and rationale.Also:
CodeCheck.ps1fails ifeng/Dependencies.propschanges without a matching update to this file.Directory.Build.props/.targetsskip importing the build-time-generatedartifacts/bin/GenerateFiles/Directory.Build.{props,targets}whenDEPENDABOT_NATIVE_HELPERS_PATHis set (set in Dependabot's own job containers) - those files never exist under Dependabot's un-built clone, which otherwise breaks MSBuild evaluation repo-wide under Dependabot. No effect on normal builds/CI.Verified end-to-end against dependabot-core's real
DiscoveryWorkerbuilt from source: all 93 packages are discovered as top-level, updatable dependencies with correctly-resolved versions.Follow-up: release-branch
nugetentries were removed for now - likemainbefore the discovery project, they'd only scandirectory: "/", which can't see most real dependencies (declared via<Reference>, not<PackageReference>). Re-add them onceeng/tools/DependabotDiscoveryis ported to those branches.Co-authored-by: Copilot [email protected]