Skip to content

[BUG]: Exclusion paths for Delete task no longer being recognized #20941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 of 7 tasks
cwatson-sd opened this issue Mar 24, 2025 · 6 comments
Closed
4 of 7 tasks

[BUG]: Exclusion paths for Delete task no longer being recognized #20941

cwatson-sd opened this issue Mar 24, 2025 · 6 comments
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug triage

Comments

@cwatson-sd
Copy link

cwatson-sd commented Mar 24, 2025

New issue checklist

Task name

Delete Files

Task version

1.246.0

Issue Description

We started noticing last week that a DeleteFiles task we had set up was no longer recognizing the exclusion filters we had set up. We have made not changes to our pipeline prior to this.

We suspect it may be an issue with the latest Microsoft Agent, but haven't been able to figure out exactly what is wrong or what we need to do.

Here is our task:

  - task: DeleteFiles@1
    displayName: 'Clean out Content UI files from Deployment folder'
    inputs:
      SourceFolder: $(build.sourcesDirectory)/Content/Projects/Source/Web/_Site/ui
      Contents: |
        **/*
        !favicon.png
        !lib/DownloadManager/**/*
        !lib/EtrieveFileAgent/**/*
      RemoveDotFiles: true

What we have noticed when we have System Diagnostics, is that the exclusion paths are being constructed with "." at the begging when it is constructing the patterns to look for. For example, the one for favicon is being constructed as ".!D:\a\1\s\Content\Projects\Source\Web_Site\ui\favicon.png,"

Full logs below.

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Microsoft Windows Server 2022 10.0.20348

Relevant log output

Contents output:
##[debug]Contents=**/*
!favicon.png
!lib/DownloadManager/**/*
!lib/EtrieveFileAgent/**/*

patterns output:
##[debug]patterns: D:\a\1\s\Content\Projects\Source\Web\_Site\ui\**\*,.\!D:\a\1\s\Content\Projects\Source\Web\_Site\ui\favicon.png,.\!D:\a\1\s\Content\Projects\Source\Web\_Site\ui\lib\DownloadManager\**\*,.\!D:\a\1\s\Content\Projects\Source\Web\_Site\ui\lib\EtrieveFileAgent\**\*

example of pattern search:
##[debug]pattern: '.\!D:\a\1\s\Content\Projects\Source\Web\_Site\ui\favicon.png'
##[debug]expanding braces
##[debug]pattern: './!D:/a/1/s/Content/Projects/Source/Web/_Site/ui/favicon.png'
##[debug]applying include pattern against original list
##[debug]0 matches

Full task logs with system.debug enabled

 

Repro steps

@emeesterinterpulse
Copy link

emeesterinterpulse commented Mar 25, 2025

Just logged in to say, we have the same issue (since yesterday)

Working release: 21-03-2025 @ 4:35PM (agent '4.252.0')
Non working release: 24-03-2025 @ 7:24 PM (agent '4.253.0'

Artifacts are empty, exclusion filters not working

@raviDev450
Copy link

We do have the same issue started yesterday, Where all of our pipelines are failing, Exclusion filters are not working.
One work around we had was to manually enter previous stable agent version in .yaml file.
But appreciate fix asap.

@cwatson-sd
Copy link
Author

Also opened issue in azure pipeline agents repo with a few more details we have found, since the issue seemed to start occurring after our hosted agents started using 4.253.0

microsoft/azure-pipelines-agent#5159

@mlarsen-sd
Copy link

To summarize what we think is the chain of events... The deletefiles@1 task started failing with agent version 4.253.0. That agent version included a NodeJS upgrade to version 20.18.2. That NodeJS version includes a security fix to path.js where it started pre-pending a .\\ if the path starts with a drive letter. This would make the pattern matching here fail.

@emeesterinterpulse
Copy link

Looks like agent version 4.253 is reverterd al our pipelines use agent 4.252 again

@tarunramsinghani
Copy link
Contributor

The task has been updated to handle the changes in Node 20.18.2 and is being deployed. Closing this as issue has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug triage
Projects
None yet
Development

No branches or pull requests

6 participants