microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.46k stars 2.6k forks source link

[BUG]: AzureRmWebAppDeployment unzip stuck on duplicate file #18024

Open Bouke opened 1 year ago

Bouke commented 1 year ago

Task name

AzureRmWebAppDeployment

Task version

4.217.2

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

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

ubuntu-latest + windows-latest

Task log

ubuntu-latest

2023-03-27T12:27:56.7297010Z ##[section]Starting: AzureRmWebAppDeployment
2023-03-27T12:27:56.7307387Z ==============================================================================
2023-03-27T12:27:56.7307696Z Task         : Azure App Service deploy
2023-03-27T12:27:56.7307856Z Description  : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
2023-03-27T12:27:56.7308198Z Version      : 4.217.2
2023-03-27T12:27:56.7308349Z Author       : Microsoft Corporation
2023-03-27T12:27:56.7308505Z Help         : https://aka.ms/azureappservicetroubleshooting
2023-03-27T12:27:56.7308704Z ==============================================================================
2023-03-27T12:27:57.2641517Z Got service connection details for Azure App Service:'tf-tst-app-legacy'
2023-03-27T12:28:00.6413936Z [command]/usr/bin/unzip /home/vsts/work/1/a/Kolonel.Web.zip -d /home/vsts/work/_temp/temp_web_package_8666998355973321
2023-03-27T12:28:00.6414662Z Archive:  /home/vsts/work/1/a/Kolonel.Web.zip
...
2023-03-27T12:28:02.1390134Z   inflating: /home/vsts/work/_temp/temp_web_package_8666998355973321/Content/Images/Wallpapers/cb-stacks.jpg  
2023-03-27T12:53:49.2818597Z replace /home/vsts/work/_temp/temp_web_package_8666998355973321/Content/pdfjs/build/pdf.js? [y]es, [n]o, [A]ll, [N]one, [r]ename: 
2023-03-27T12:53:49.3024982Z ##[error]The operation was canceled.
2023-03-27T12:53:49.3036742Z ##[section]Finishing: AzureRmWebAppDeployment

windows-latest

2023-03-27T13:16:20.4656509Z ##[section]Starting: AzureRmWebAppDeployment
2023-03-27T13:16:20.4801423Z ==============================================================================
2023-03-27T13:16:20.4801774Z Task         : Azure App Service deploy
2023-03-27T13:16:20.4801929Z Description  : Deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
2023-03-27T13:16:20.4802246Z Version      : 4.217.2
2023-03-27T13:16:20.4802368Z Author       : Microsoft Corporation
2023-03-27T13:16:20.4802525Z Help         : https://aka.ms/azureappservicetroubleshooting
2023-03-27T13:16:20.4802707Z ==============================================================================
2023-03-27T13:16:24.5138082Z Got service connection details for Azure App Service:'tf-tst-app-legacy'
2023-03-27T13:16:25.3267680Z [command]D:\a\_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1\4.217.2\node_modules\azure-pipelines-tasks-webdeployment-common\7zip\7zip\7z.exe x -oD:\a\_temp\temp_web_package_08745017037861902 D:\a\1\a\Kolonel.Web.zip
2023-03-27T13:16:25.3398888Z 
2023-03-27T13:16:25.3449509Z 7-Zip [64] 16.00 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-10
2023-03-27T13:16:25.3465640Z 
2023-03-27T13:16:25.3466189Z Scanning the drive for archives:
2023-03-27T13:16:25.3466682Z 1 file, 105631101 bytes (101 MiB)
2023-03-27T13:16:25.3469463Z 
2023-03-27T13:16:25.3469954Z Extracting archive: D:\a\1\a\Kolonel.Web.zip
2023-03-27T13:16:26.9510632Z --
2023-03-27T13:16:26.9511016Z Path = D:\a\1\a\Kolonel.Web.zip
2023-03-27T13:16:26.9511305Z Type = zip
2023-03-27T13:16:26.9511536Z Physical Size = 105631101
2023-03-27T13:16:26.9511678Z 
2023-03-27T13:16:26.9511755Z 
2023-03-27T13:16:26.9512008Z Would you like to replace the existing file:
2023-03-27T13:16:26.9512401Z   Path:     D:\a\_temp\temp_web_package_08745017037861902\Content\pdfjs\build\pdf.js
2023-03-27T13:16:26.9512776Z   Size:     425630 bytes (416 KiB)
2023-03-27T13:16:26.9513102Z   Modified: 2023-03-27 11:17:16
2023-03-27T13:16:26.9513380Z with the file from archive:
2023-03-27T13:16:26.9513664Z   Path:     Content\pdfjs\build\pdf.js
2023-03-27T13:16:26.9513955Z   Size:     425630 bytes (416 KiB)
2023-03-27T13:16:26.9514235Z   Modified: 2023-03-27 11:17:28
2023-03-27T13:31:06.1216109Z ? (Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit? 
2023-03-27T13:31:06.4054744Z ##[error]The operation was canceled.

Relevant log output

ubuntu-latest

2023-03-27T12:28:00.6413936Z [command]/usr/bin/unzip /home/vsts/work/1/a/Kolonel.Web.zip -d /home/vsts/work/_temp/temp_web_package_8666998355973321
2023-03-27T12:53:49.2818597Z replace /home/vsts/work/_temp/temp_web_package_8666998355973321/Content/pdfjs/build/pdf.js? [y]es, [n]o, [A]ll, [N]one, [r]ename:

windows-latest

2023-03-27T13:16:26.9512008Z Would you like to replace the existing file:
2023-03-27T13:16:26.9512401Z   Path:     D:\a\_temp\temp_web_package_08745017037861902\Content\pdfjs\build\pdf.js
2023-03-27T13:16:26.9512776Z   Size:     425630 bytes (416 KiB)
2023-03-27T13:16:26.9513102Z   Modified: 2023-03-27 11:17:16
2023-03-27T13:16:26.9513380Z with the file from archive:
2023-03-27T13:16:26.9513664Z   Path:     Content\pdfjs\build\pdf.js
2023-03-27T13:16:26.9513955Z   Size:     425630 bytes (416 KiB)
2023-03-27T13:16:26.9514235Z   Modified: 2023-03-27 11:17:28
2023-03-27T13:31:06.1216109Z ? (Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit? 
2023-03-27T13:31:06.4054744Z ##[error]The operation was canceled.

Aditional info

Note that the task doesn't pass -o to overwrite existing files. The task just hangs. On both ubuntu and windows.

norigeist commented 1 year ago

I have the exact issue as well and was wondering why the overwirteExistingFiles param was not applied. My current workaround is to extract the files into a different folder with multiple tasks.

Environment: Microsoft Hosted, image: windows-latest

  - task: ExtractFiles@1
    displayName: 'Unzip build artifacts'
    inputs:
      archiveFilePatterns: '$(Pipeline.Workspace)/Build-Folder/**/*.zip'
      destinationFolder: '$(Build.ArtifactStagingDirectory)'
      cleanDestinationFolder: true
      overwriteExistingFiles: false
Scanning the drive for archives:
1 file, 33205358 bytes (32 MiB)

Extracting archive: D:\a\1\Test_27647.zip
--
Path = D:\a\1\Test_27647.zip
Type = zip
Physical Size = 33205358

Would you like to replace the existing file:
  Path:     D:\a\1\a\BouncyCastle.Crypto.dll
  Size:     2302976 bytes (2249 KiB)
  Modified: 2020-02-27 22:41:58
with the file from archive:
  Path:     BouncyCastle.Crypto.dll
  Size:     2609152 bytes (2548 KiB)
  Modified: 2020-12-08 18:05:32
? (Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit? 
Archives with Errors: 1

stderr: 

Break signaled

error: undefined;
marcelom2s commented 1 year ago

I have the same issue.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Bouke commented 9 months ago

Hello, anyone?