-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Area: ReleasebugregressionThis used to work, but a change in the service/tasks broke it.This used to work, but a change in the service/tasks broke it.triage
Description
New issue checklist
- I searched for existing GitHub issues
- I read pipeline troubleshooting guide
- I checked how to collect logs
Task name
FileTransform@2
Breaking task version
2.249.1
Last working task version
2.246.1
Regression Description
In the previous version, if there was nothing to transform in the file, an error message would appear but the task would return Succeeded

Now if there is nothing to transform in the file, the error message appears but the task now returns SucceededWithIssues

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
ubuntu-22.04
Relevant log output
<details>
<summary>UNSUCCESSFUL RUN</summary>
<pre> 2025-02-05T00:08:17.2161292Z ##[section]Starting: File transformation: appsettings.json
2025-02-05T00:08:17.2195145Z ==============================================================================
2025-02-05T00:08:17.2196642Z Task : File transform
2025-02-05T00:08:17.2197981Z Description : Replace tokens with variable values in XML or JSON configuration files
2025-02-05T00:08:17.2199358Z Version : 2.249.1
2025-02-05T00:08:17.2203107Z Author : Microsoft Corporation
2025-02-05T00:08:17.2204433Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/file-transform
2025-02-05T00:08:17.2205729Z ==============================================================================
2025-02-05T00:08:19.3347067Z Applying JSON variable substitution for **/appsettings.json
2025-02-05T00:08:20.3314853Z Applying JSON variable substitution for /__w/1/s/removedi/appsettings.json
2025-02-05T00:08:20.3360350Z ##[error]Error: Failed to apply JSON variable substitution. Changes are already present in the package.
2025-02-05T00:08:20.3392675Z ##[section]Finishing: File transformation: appsettings.json ] </pre>
</details>
<details>
<summary>SUCCESSFUL RUN</summary>
<pre>2025-02-02T07:04:20.6114722Z ##[section]Starting: File transformation: appsettings.json
2025-02-02T07:04:20.6141914Z ==============================================================================
2025-02-02T07:04:20.6143251Z Task : File transform
2025-02-02T07:04:20.6144135Z Description : Replace tokens with variable values in XML or JSON configuration files
2025-02-02T07:04:20.6145163Z Version : 2.246.1
2025-02-02T07:04:20.6146091Z Author : Microsoft Corporation
2025-02-02T07:04:20.6147005Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/file-transform
2025-02-02T07:04:20.6148049Z ==============================================================================
2025-02-02T07:04:22.3341889Z Applying JSON variable substitution for **/appsettings.json
2025-02-02T07:04:23.1457122Z Applying JSON variable substitution for /__w/1/s/removed/appsettings.json
2025-02-02T07:04:23.1489941Z ##[error]Failed to apply JSON variable substitution. Changes are already present in the package.
2025-02-02T07:04:23.1511458Z ##[section]Finishing: File transformation: appsettings.json</pre>
</details>Full task logs with system.debug enabled
Repro steps
woeterman94, Devvox93, ppi-kosipenko, andoz1, msoler8785 and 1 more
Metadata
Metadata
Assignees
Labels
Area: ReleasebugregressionThis used to work, but a change in the service/tasks broke it.This used to work, but a change in the service/tasks broke it.triage