Skip to content
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

Using CopyFiles with CleanTargetFolder fails if the target folder does not exist #16706

Closed
tydunkel opened this issue Aug 9, 2022 · 5 comments
Assignees

Comments

@tydunkel
Copy link
Member

tydunkel commented Aug 9, 2022

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: CopyFilesV2

Environment

Issue Description

This PR seems to have regressed using the CopyFilesV2 task with CleanTargetFolder: true when the folder doesn't exist. I believe this change is the cause since the function call switched from ignoring ENOENT to throwing.

Turning off CleanTargetFolder resolves the issue.

Task logs

Starting: Copy localization files
==============================================================================
Task         : Copy files
Description  : Copy files from a source folder to a target folder using patterns matching file paths (not folder paths)
Version      : 2.208.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/copy-files
==============================================================================
found 878 files
Cleaning target folder: D:\a\_work\1\a\loc
##[warning]Entry "D:\a\_work\1\a\loc" does not exist
##[error]Error: Entry "D:\a\_work\1\a\loc" does not exist
Finishing: Copy localization files
@tydunkel
Copy link
Member Author

tydunkel commented Aug 9, 2022

Note: 2.200.0 was working for us yesterday, and today it seems that 2.208.0 is being used, so I do believe the linked PR is the root cause since the version bumped from 2.200.0 -> 2.208.0 in that PR.

Successful run:

Starting: Copy localization files
==============================================================================
Task         : Copy files
Description  : Copy files from a source folder to a target folder using patterns matching file paths (not folder paths)
Version      : 2.200.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/copy-files
==============================================================================
found 878 files
Cleaning target folder: D:\a\_work\1\a\loc
...

@delmyers
Copy link

Thanks for working on this so quickly. Wondering about an ETA on this fix, since many of our builds are currently failing due to it.

@DenisRumyantsev
Copy link
Contributor

@delmyers we are going to roll out the rollback today.
@tydunkel thank you for your pull request with the fix. We will review and merge it before the next release of the tasks.

@tydunkel
Copy link
Member Author

Confirmed this morning that 2.208.1 is pulled which contains the revert.

@DenisRumyantsev
Copy link
Contributor

@tydunkel, let me close this issue since your PR with the fix was merged

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

No branches or pull requests

3 participants