Skip to content

Fix ExtractFile Node 24 migration issue#1146

Merged
rajmishra1997 merged 6 commits intomasterfrom
users/rajmishra/ExtractFileNode24Issue
Jan 7, 2026
Merged

Fix ExtractFile Node 24 migration issue#1146
rajmishra1997 merged 6 commits intomasterfrom
users/rajmishra/ExtractFileNode24Issue

Conversation

@rajmishra1997
Copy link
Contributor

@rajmishra1997 rajmishra1997 commented Dec 23, 2025

Issue:
Canary Test pipeline failed after Node 24 migartion for Task ExtractFile: https://dev.azure.com/canarytest/PipelineTasks/_build/results?buildId=235044&view=results

AB#2343422
AB#2343402

Why this issue:

  • As part of node 24 migration, task-lib version is changed from 4.16.0 to 5.2.2
  • Issue arose from line 1123
  • task.ts ls functionality changed in PR: Remove the shelljs dependency #1079, Earlier version used shell.js
  • Line 1123, pathsCopy.find, which is Array.Prototype.Find should return undefined in case of no match but returned -1
  • This issue was caused by a custom polyfill implementation overriding the native behavior, as shown in the image below.
arrayfindIssue

Solution:

  1. Added method "safeFind" in place of Array.Prototype.Find
  2. Tested in DevFabric

Failure Scenario:
extractFileIssue

Successful Scenario
ExtractFileFixed

@rajmishra1997 rajmishra1997 requested review from a team as code owners December 23, 2025 10:32
@rajmishra1997
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rajmishra1997
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@raujaiswal
Copy link
Contributor

@rajmishra1997 , could you please check if we miss to upgrade the version of task-lib in package.json with this changes. from 5.2.2 to 5.2.3 ?

@raujaiswal raujaiswal self-requested a review December 29, 2025 04:35
@rajmishra1997
Copy link
Contributor Author

@rajmishra1997 , could you please check if we miss to upgrade the version of task-lib in package.json with this changes. from 5.2.2 to 5.2.3 ?

Updated

@rajmishra1997
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rajmishra1997 rajmishra1997 merged commit f5cfa16 into master Jan 7, 2026
7 checks passed
@rajmishra1997 rajmishra1997 deleted the users/rajmishra/ExtractFileNode24Issue branch January 7, 2026 08:46
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.

5 participants