Closed v-mBorisov closed 5 days ago
This also affects AzurePowerShell@4
.
@v-mBorisov Do you have any idea when this issue will be fixed and published?
Until then, do you have any suggestions on a low-impact workaround for this issue? I'm working with a team that is currently affected by this.
@DanielMannInCycle Hi, sorry for delay, I'm planning to do this this week, but I'm not sure exactly. Unfortunately, there is a possibility that this will not be fixed completely, but we will only reduce the frequency of the error.
In the incident https://portal.microsofticm.com/imp/v3/incidents/incident/526602860/summary it is described that as a workaround we do not recommend using parallel launches of pipelines. Docs: https://learn.microsoft.com/en-us/powershell/module/az.accounts/update-azconfig?view=azps-12.1.0
@v-mBorisov But that's the thing -- we're not updating anything. The task is forcing it. This isn't behavior we want or need. Isn't a reasonable solution to add a flag for disabling the behavior entirely so we can just skip it?
@DanielMannInCycle I consulted with the team and found out that we cannot install the flag. The most convenient solution would be to update only when necessary. This will work for you.
I'm already working on a fix.
Would it be possible to add -Scope Process
to the call of Update-AZConfig so the recommendation from the Microsoft Docs is followed?
@v-mBorisov Any updates on this? When can we expect a fix to be released?
@DanielMannInCycle The fix was added a week ago and will be added to release 244.
New issue checklist
Task name
No response
Breaking task version
242
Last working task version
241
Regression Description
Related to ADO ICM: https://portal.microsofticm.com/imp/v3/incidents/incident/526602860/summary
In release 242, a call to Update-AzConfig was added that call 'PSConfig.json'
https://github.com/microsoft/azure-pipelines-tasks/compare/v241...v242#diff-c520ded3c957b670319b7dbc38c894dd277ddd1127060bd29df898771fab340cL34
For this reason, customers is running parallel jobs on the same Windows agent under the same user account for each process receive an error.
_The process cannot access the file 'C:\Users\Service_TSDAZBLD.Azure\PSConfig.json' because it is being used by another process.
It might be worth considering using Get-AzConfig to check whether the Update-AzConfig call is necessary
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
Windows 11
Relevant log output
Pull Request:
https://github.com/microsoft/azure-pipelines-tasks/pull/20304
Full task logs with system.debug enabled
No response
Repro steps
No response