Skip to content

Conversation

@Stuart-Wilcox
Copy link

@Stuart-Wilcox Stuart-Wilcox commented Oct 16, 2025

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@1 in a repo that includes an existing node_modules for 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.find and make use of fs and fast-glob instead.


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-glob


Change Behind Feature Flag (Yes / No)

Can this change be behine feature flag, if not why?

This could be done, if necessary


Tech Design / Approach

  • Design has been written and reviewed.
  • Any architectural decisions, trade-offs, and alternatives are captured.

None


Documentation Changes Required (Yes/No)

Indicate whether related documentation needs to be updated.

  • User guides, API specs, system diagrams, or runbooks are 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 sourceDirectory to 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)

  • Appropriate log statements are added with meaningful messages.
  • Logging does not expose sensitive data.
  • Log levels are used correctly (e.g., info, warn, error).

No


Telemetry Added/Updated (Yes/No)

  • Custom telemetry (e.g., counters, timers, error tracking) is added as needed.
  • Events are tagged with proper metadata for filtering and analysis.
  • Telemetry is validated in staging or test environments.

No


Rollback Scenario and Process (Yes/No)

  • Rollback plan is documented.

No


Dependency Impact Assessed and Regression Tested (Yes/No)

  • All impacted internal modules, APIs, services, and third-party libraries are analyzed.
  • Results are reviewed and confirmed to not break existing functionality.

No


Checklist

@Stuart-Wilcox
Copy link
Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 21385 in repo microsoft/azure-pipelines-tasks


// short-circuit if not exists
if (!foundPaths.length) {
if (!tl.exist(sourceFolder)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is an issue with task-lib we should push this fix in task-lib instead of fixing jus tthis task as task-lib is shared between multiple tasks and other tasks might be vuln to same bug...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants