Update DeleteFiles@1 Implementation To Use fast-glob Instead of tl.find #21385
+252
−31
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.
Context
Describe the context or motivation for this PR. Include links to any related Azure DevOps Work Items or GitHub issues.
📌 How to link to ADO Work Items
Using
DeleteFiles@1in a repo that includes an existingnode_modulesfor a very large workspace caused the task to fail with out-of-memory problems. This is because the task reads all the files/directories before starting to pattern match then delete.Task Name
Name of the updated or newly created pipeline task.
DeleteFiles@1
Description
Summarize the changes made in this PR clearly and concisely.
Remove usage of
tl.findand make use offsandfast-globinstead.Risk Assessment (Low / Medium / High)
Assess the level of risk and provide reasoning (e.g., scope, impact, backward compatibility).
Medium - this passed the tests but still may cause differences as compared to the logic that existed before. It also takes on a new npm dependency
fast-globChange Behind Feature Flag (Yes / No)
Can this change be behine feature flag, if not why?
This could be done, if necessary
Tech Design / Approach
None
Documentation Changes Required (Yes/No)
Indicate whether related documentation needs to be updated.
N/A - no changes to user input
Unit Tests Added or Updated (Yes / No)
Indicate whether unit tests were added or modified to reflect these changes.
No unit tests changed as behaviour remains identical. It would be nice to simulate a very very large
sourceDirectoryto replicate what I'm seeing in my pipeline runs, but I wasn't sure how to realistically accomplish that in a test scenario.Additional Testing Performed
List all other tests performed (manual or automated, including integration, regression, scenario tests, etc.).
None
Logging Added/Updated (Yes/No)
No
Telemetry Added/Updated (Yes/No)
No
Rollback Scenario and Process (Yes/No)
No
Dependency Impact Assessed and Regression Tested (Yes/No)
No
Checklist