-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[BUG]: AzureFileCopy to VM fails #19685
Comments
We are also facing the same issue with the AzureFileCopy task, trying to use workaround with azcopy to copy the builds to the VMs, |
Hi all, the task version is now reverted to 5.236.1. can you please rerun your pipeline and confirm back with the result. Thanks |
Seeing the same error with version 5.236.1. |
Re-ran the pipelines
Re-ran the deployment pipelines, are the Azure file copy task's revert didn't helped with the issue, https://learn.microsoft.com/en-us/powershell/azure/release-notes-azureps#azstorage-600 The task log is not very helpful as it displays the source URI with five asterisks appended, while in reality, a slash, an asterisk, and the SAS token are appended. The New-AzStorageContainerSASToken cmdlet is called in Generate-AzureStorageContainerSASToken defined in AzureUtilityAz1.0.ps1. That one is called from Copy-FilesToAzureVMsFromStorageContainer defined in Utility.ps1, which is called from AzureFileCopy.ps1 itself. There, it can be seen that Copy-FilesToAzureVMsFromStorageContainer gets the "fileCopyJobScript" scriptblock from AzureFileCopyRemoteJob.ps1. At the bottom, see the uses of containerSasToken: "$containerURL/*$containerSasToken" |
Transfer to the blob appeared to work okay but it's the azcopy to the VM that is raising the error. Confirmed that 5.236.1 was the last successful version run. Log file for the failure is: 2024-03-26T08:48:40.4356045Z INFO: Logout succeeded. |
Great work Sherlock! ;o) |
See gusAntonis reply above. Adding the ? and rolling forward might be the simpler route as both seem dependent on that breaking change in the other module. Just change the line to or check to see if the $containerSasToken starts with a ? and if not add one: "$containerURL/*?$containerSasToken" |
Can confirm the same behaviour for our pipeline as well,
|
Hello guys is there anyone acting upon this issue. This has severely impacted the deployment pipelines. |
All deployments have been obstructed guys, hope we understand the urgency here. |
Can we get an update on this issue please? It is causing problems with many users and it seems that a simple fix of adding the ? between the url and sas token will resolve the problem. I look forward to an update. |
Hi @AndrewBates666 @gusAntonis , I have created a PR #19700 for the proposed changes. Meanwhile, since i am unable to repro the issue from my end, I might need anyone of you to assist here, to follow the below simple procedure to test if it fixes the issue. If the changes do work, same can be followed to unblock your case here immediately without need to wait for regular task deployment (which might take upto weeks) Local task test Step 1: run "npm i" Step 2: Build:
Step 3: Install tfx:
Step 4: Login:
Step 5: Upload:
New task version will be uploaded to your org, please test the changes by running the pipeline. Step 6: Delete: // optional and can be done after all the testing is completed.
|
I have reviewed the PR and testing the same in our env as well. |
We can only test in the Hosted Agents so let us know when it will be released and we will run tests on it. Best A |
once @gusAntonis confirms the changes to be working fine, I will proceed to get in touch with relevant task owners to get it merged. Ideally once merged it might take 5-7 working days to be deployed on all the regions. |
My agents are also azure hosted, i can give this a try to use a self hosted agent as well, |
@v-mohithgc Hi, versioning of the tasks seems odd to me. When you complete an update rather than adding a new task version you seem to update all versions. This means that if we see a failure we don't have any option to use another version. Logically I'd expect new versions to be added so AzureFileCopy@7 which has the new code in. We've seen several failures with AzureFileCopy over the past few months and it breaks our pipelines and we don't have a way to revert unless you do so; we've lost hours of dev/test through the breakage. Just a thought... |
So we have few issues here, And i am not able to find the build task at the specified directory : |
yes its \ _build... for some reason GH is not allowing that. so after the build succedds, _build folder will be generated, you need to copy task path under the _build folder and then do tfx upload. |
@v-mohithgc |
I see that this has been merged a week ago, however it has not been released yet (we have 5.237.11 btw.) When can we expect a release of the fix as all deployments are currently dead? |
I have been informed that the new task deployment cycle was started yesterday, and latest version (i.e 5.237.12) is already out on few regions. It might take the next 2-4 working days to be rolled out on all the regions. |
Thanks for the update @v-mohithgc, |
We still have version 5.237.11 in our deployments. We use Azure Hosted agents in region West Europe. When is the fix in version 5.237.12 available in West Europe? |
New issue checklist
Task name
AzureFilecopy
Task version
5.237.1
Issue Description
The AzureFileCopy command started failing last week after presumably being updated. The error being reported is:
2024-03-21T10:42:55.7596977Z -ExecutionPolicy Unrestricted -Command ".
2024-03-21T10:42:55.7597475Z 'C:\Users\adminuser\AppData\Local\Temp\0a0b6c85-26a3-4c18-803e-537ce07dce30.ps1'"
2024-03-21T10:42:55.7597735Z
2024-03-21T10:42:55.7739358Z VERBOSE: Using default AzCopy arguments for dowloading to VM
2024-03-21T10:42:55.7740270Z
2024-03-21T10:42:55.7787839Z VERBOSE: ##[command] & azcopy copy
2024-03-21T10:42:55.7788454Z
2024-03-21T10:42:56.4219789Z "https://XXXdevconfigstorage.blob.core.windows.net/e576feb6-e8bb-47a2-8806-55dc5fea1c13*****"
2024-03-21T10:42:56.4220051Z
2024-03-21T10:42:56.4220291Z "c:\temp" --recursive --log-level=INFO
2024-03-21T10:42:56.4220397Z
2024-03-21T10:42:56.4220445Z
2024-03-21T10:42:56.4220489Z
2024-03-21T10:42:56.4220763Z failed to parse user input due to error: cannot use wildcards in the path section of the URL except in trailing "/*". If you wish to use * in your URL, manually encode it to %2A
2024-03-21T10:42:56.4220980Z
Apparently the SAS token is being added to the URL but it is missing the ? separator.
We have implemented a workaround as proposed by another user using two tasks, one to upload to the blob and another PowerShell script to copy from the blob to the VM but this has started to fail this week.
The problem with the workaround is that it appears that the azcopy command is not being found on the Hosted Agent so the workaround no longer works for us. The error reported is:
2024-03-25T16:45:00.5157506Z azcopy : The term 'azcopy' is not recognized as the name of a cmdlet, function, script file, or
2024-03-25T16:45:00.5157839Z At line:1 char:1
2024-03-25T16:45:00.5158421Z + & 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -NoLogo ...
2024-03-25T16:45:00.5159704Z + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-03-25T16:45:00.5160428Z + CategoryInfo : NotSpecified: (azcopy : The te...cript file, or :String) [], RemoteException
2024-03-25T16:45:00.5160843Z + FullyQualifiedErrorId : NativeCommandError
2024-03-25T16:45:00.5161132Z
2024-03-25T16:45:00.5161307Z
2024-03-25T16:45:00.5264081Z operable program. Check the spelling of the name, or if a path was included, verify that the path
2024-03-25T16:45:00.5264566Z
2024-03-25T16:45:00.5344297Z is correct and try again.
Currently we can't release any of our software so development and testing teams are blocked.
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)
Windows Server 2019/2022
Operation system
Windows Server 2019/2022
Relevant log output
Full task logs with system.debug enabled
Repro steps
An AzureFileCopy task to copy a file onto a VM was working correctly great before last week but started to fail. We noted that the build version of the task changed from 5.236.1 (worked okay) to 5.237.1 (fails).
The text was updated successfully, but these errors were encountered: