Skip to content

[BUG]: Fix CopyFilesV2 task failure with 'fs.rmSync is not a function' on older agents #21044

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented May 22, 2025

This PR fixes an issue where the CopyFilesV2 task fails on older agent versions with the error:

Error: Failed rmRF: fs.rmSync is not a function

Root cause

The task is failing because:

  1. CopyFilesV2 depends on azure-pipelines-task-lib v5.2.0
  2. This version uses fs.rmSync() which was added in Node.js v14.14.0
  3. Older agents (like 2.202.1) don't have Node 14+ execution handlers
  4. The task's minimumAgentVersion was set to 2.182.1, which is too low

Changes made

  • Updated the minimumAgentVersion from 2.182.1 to 2.206.1 (first agent version with Node16 support)
  • Removed Node10 execution handler since it can't support the required Node.js v14+ features
  • Incremented the patch version from 2.256.0 to 2.256.1

These changes ensure the task only runs on agents that have the required Node.js version to support the dependencies. The actual functionality of the task remains unchanged.

Fixes #21027.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • pkgs.dev.azure.com
    • Triggering command: npm view [email protected] engines (dns block)
    • Triggering command: npm install (dns block)
    • Triggering command: npm install @octokit/rest (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] [BUG]: Failed rmRF: fs.rmSync is not a function in CopyFilesV2 with old agents [BUG]: Fix CopyFilesV2 task failure with 'fs.rmSync is not a function' on older agents May 22, 2025
@Copilot Copilot AI requested a review from sanjuyadav24 May 22, 2025 12:59
Copilot finished work on behalf of sanjuyadav24 May 22, 2025 12:59
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.

[BUG]: Failed rmRF: fs.rmSync is not a function in CopyFilesV2 with old agents
2 participants