azure-pipelines-agent: Builds of shelvesets that include files at paths not in the repository mappings causes build to fail
Have you try trouble shooting doc?
Link to trouble shooting doc: https://www.visualstudio.com/en-us/docs/build/troubleshooting Yes
Agent version and platform
Version of your agent? 2.112.0
OS of the machine running the agent? Windows Server 2012 R2 Standard
VSTS type and version
VisualStudio.com or On-Prem TFS? On-Prem
If On-Prem TFS, which release, 2015 RTM/QU1/QU2? TFS 2017 Update 1
What’s not working?
For a build definition that has a repository mapping of $/x/y/z
, the build will fail if you attempt to build a shelveset that includes changes of files not under $/x/y/z
. The following error causes the build to fail:
No appropriate mapping exists for $/path/to/file/not/in/mappings/file.cs.
E.g. the following log is from a build that has a repository mapping of $/TFS Test/XXXX/ShelvesetRepro/Production
. I created a shelveset that includes changes of files under this path and changes to files under a different location at $/TFS Test/XXXX/ShelvesetRepro/Uat
(note different leaf folders of Uat vs Production). Attempting to build the shelveset generates this log and fails:
tf vc get /version:416237 /recursive /overwrite D:\B\1\2\s /loginType:OAuth /login:.,******** /noprompt
All files are up to date.
tf vc unshelve "Hello Shelveset;XXXXX\x.xxxxxxx" /loginType:OAuth /login:.,******** /noprompt
No appropriate mapping exists for $/TFS Test/XXXX/ShelvesetRepro/Uat/ConsoleApp1/Program.cs. ConsoleApp1:
Unshelving edit: Program.cs
Exit code 1 returned from process: file name 'tf', arguments 'vc unshelve "Hello
Shelveset;XXXXX\x.xxxxxxx" /loginType:OAuth /login:.,******** /noprompt'.
This is a change of behavior from XAML build as the unmapped path would be ignored and the build succeed. With the current behavior of the TF Build agent you are required to map every possible path that could be included in a shelveset (even those not relevant to the build itself), which ultimately leads to creating a single mapping close to the root of the repository. This is not desirable in large repositories.
Agent and Worker’s diag log
Agent log for get sources step:
2017-07-19T21:30:18.2337518Z ##[debug]Attempting to find a workspace: 'ws_2_86'
2017-07-19T21:30:18.2337518Z ##[debug]Skipping workspace: 'ws_1_79'
2017-07-19T21:30:18.2337518Z ##[debug]Skipping workspace: 'ws_1_82'
2017-07-19T21:30:18.2337518Z ##[debug]Skipping workspace: 'ws_1_86'
2017-07-19T21:30:18.2337518Z ##[debug]Skipping workspace: 'ws_10_74'
2017-07-19T21:30:18.2337518Z ##[debug]Skipping workspace: 'ws_11_74'
2017-07-19T21:30:18.2337518Z ##[debug]Skipping workspace: 'ws_2_82'
2017-07-19T21:30:18.2337518Z ##[debug]Candidate workspace: 'ws_2_86'
2017-07-19T21:30:18.2337518Z ##[debug]Definition mapping[0]: cloak 'False', recursive 'True', server path '$/TFS Test/XXXX/ShelvesetRepro/Production', local path 'D:\B\1\2\s'
2017-07-19T21:30:18.2337518Z ##[debug]Found mapping[0]: cloak 'False', recursive 'True', server path '$/TFS Test/XXXX/ShelvesetRepro/Production', local path 'D:\B\1\2\s'
2017-07-19T21:30:18.2337518Z ##[debug]Matching workspace found.
2017-07-19T21:30:18.2337518Z ##[debug]tf vc status /workspace:ws_2_86 /recursive /nodetect /format:xml /collection:http://XXXXXX:8080/tfs/Main/ /loginType:OAuth /login:.,******** /noprompt
2017-07-19T21:30:18.7337824Z ##[debug]<Status />
2017-07-19T21:30:18.7650348Z ##[command]tf vc get /version:416237 /recursive /overwrite D:\B\1\2\s /loginType:OAuth /login:.,******** /noprompt
2017-07-19T21:30:19.8744513Z All files are up to date.
2017-07-19T21:30:19.8900791Z ##[command]tf vc unshelve "Hello Shelveset;XXXXXX\X.XXXXX" /loginType:OAuth /login:.,******** /noprompt
2017-07-19T21:30:21.5620307Z No appropriate mapping exists for $/TFS Test/XXXX/ShelvesetRepro/Uat/ConsoleApp1/Program.cs.
2017-07-19T21:30:21.5620307Z ConsoleApp1:
2017-07-19T21:30:21.5620307Z Unshelving edit: Program.cs
2017-07-19T21:30:21.8121044Z ##[error]Exit code 1 returned from process: file name 'tf', arguments 'vc unshelve "Hello Shelveset;XXXXXX\X.XXXXX" /loginType:OAuth /login:.,******** /noprompt'.
2017-07-19T21:30:21.8121044Z ##[debug]Microsoft.VisualStudio.Services.Agent.ProcessExitCodeException: Exit code 1 returned from process: file name 'tf', arguments 'vc unshelve "Hello Shelveset;XXXXXX\X.XXXXX" /loginType:OAuth /login:.,******** /noprompt'.
at Microsoft.VisualStudio.Services.Agent.ProcessInvoker.<ExecuteAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Agent.Worker.Build.TfsVCCommandManager.<RunCommandAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Agent.Worker.Build.TFCommandManager.<UnshelveAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Agent.Worker.Build.TfsVCSourceProvider.<GetSourceAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Agent.Worker.Build.BuildJobExtension.<PrepareAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Agent.Worker.JobExtensionRunner.<RunAsync>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.<RunAsync>d__0.MoveNext()
2017-07-19T21:30:21.8276982Z ##[section]Finishing: Get Sources
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (5 by maintainers)
Commits related to this issue
- Merge pull request #1087 from yl2558/users/yiqli/fix_updateReadmeFile_fail change ubuntu1604-readme download dir — committed to prebansa/azure-pipelines-agent by yl2558 5 years ago
Bad bot.
This issue has had no activity in 180 days. Please comment if it is not actually stale
on this matter - is there a way to have one of the following:
thanks,
Any update on repairing this loss of functionality in vNext?