redo recursive directory matching with logging#15072
Merged
Merged
Conversation
13ddf3d to
8057f2a
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the NuGet updater’s PowerShell SDK discovery path to use regex-based recursive directory matching and add diagnostic logging around global.json discovery and SDK/targeting-pack installation.
Changes:
- Adds gated PowerShell logging via
DEPENDABOT_LOG_MESSAGES. - Reworks
global.jsondiscovery to enumerate repo directories and match configured update directories with generated regexes. - Adds test fixtures and cases for deep and recursive
global.jsondiscovery.
Show a summary per file
| File | Description |
|---|---|
nuget/updater/common.ps1 |
Adds logging and regex-based directory discovery for SDK install decisions. |
nuget/updater/main.ps1 |
Enables diagnostic logging during update execution. |
nuget/updater/test.ps1 |
Adds test coverage for deep and recursive wildcard discovery cases. |
nuget/updater/test-data/global-json-discovery-deep/src/client/global.json |
Fixture for a nested global.json. |
nuget/updater/test-data/global-json-discovery-recursive-wildcard-skip-root/global.json |
Fixture for root-level SDK discovery during recursive matching. |
nuget/updater/test-data/global-json-discovery-recursive-wildcard-skip-root/src/global.json |
Fixture for matched subdirectory SDK discovery. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 2
ryanbrandenburg
approved these changes
May 19, 2026
dca933b to
feb1e20
Compare
1 task
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.
When a job starts a PowerShell script first scans for relevant
global.jsonfiles to install the appropriate SDKs, but when this fails it's really difficult to diagnose.This PR uses a regex-based approach to matching recursive subdirectories and logs absolutely everything it does so failures to find or install SDKs can be debugged.