Conversation
…ash on renamed paths findAllParentsWithFile was re-throwing ENOENT errors when scanning directories that no longer exist (e.g. after a folder restructure PR renames/deletes paths). Since git diff reports both old and new paths, deleted directories caused an uncaught exception that crashed the entire SDK generation process. Changed findAllParentsWithFile to match findParentWithFile behavior: log a warning and return early instead of throwing. Also added a top-level try-catch in index.ts main() so unexpected exceptions properly set the pipeline step result to Failed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Next Steps to MergeNext steps that must be taken to merge this PR:
Comment generated by summarize-checks workflow run. |
mikeharder
approved these changes
Mar 2, 2026
Member
mikeharder
left a comment
There was a problem hiding this comment.
I think we can handle this a bit more gracefully when we create the shared helper, but this is fine for now.
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.
Problem
FindAllParentsWithFilein\eng/tools/spec-gen-sdk-runner/src/utils.tsre-throws ENOENT errors when scanning directories that no longer exist on disk. When a PR renames/restructures folder paths (e.g. keyvault folder migration PR #38668), \git diff\ reports both old and new paths. The old paths don't exist after checkout, and for paths containingdata-planeorresource-manager, the code crashes the entire Node.js process with an uncaught exception — preventing any SDK generation from running.Fix
FindAllParentsWithFile: Changed to matchFindParentWithFilebehavior — catch errors, log a warning, and return early instead of re-throwing.main()inindex.ts: Added top-level try-catch so unexpected exceptions properly set the pipeline step result toFailed.