microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.73k stars 867 forks source link

[BUG]: Missing dependencies in externals vstsom folder #5011

Open andyfisher100 opened 1 month ago

andyfisher100 commented 1 month ago

What happened?

At some point between version v3.234.0 and v3.245 of the agent, the version of the Azure DevOps Client SDK, which exists in the externals\vstsom folder, was bumped from v15 to v16. In v16 there seems to be some additional dependencies that are missing which v15 did not require

In the Azure Pipeline Task lib there is a script that can be run ro check which dlls are actually required to be bundled with any task you may develop. This script used is the following https://github.com/microsoft/azure-pipelines-task-lib/blob/master/powershell/VstsTaskSdk/ServerOMFunctions.ps1

For our task we require the dll Microsoft.TeamFoundation.Build2.WebApi.dll. This dll then has the following dependencies

  1. Microsoft.VisualStudio.Service.WebApi.dll :white_check_mark:
  2. System.IdentityModel.Tokens.Jwt.dll :white_check_mark:
  3. Microsoft.IdentityModel.Logging.dll :x: Microsoft.IdentityModel.Tokens.dll :x:

So the main issue comes with the added dependency on System.IdentityModel.Tokens.Jwt.dll which then requires its own 2 additional dependencies.

I managed to work around this in my custom tasks pipeline by copying the files from the bin directory of the agent, as it appears the agent itself requires these dependencies too but they are actually bundled

Im not sure if there are more additional dependencies other than the two that I hit in my custom task development

Versions

v3.245

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

No response

Version controll system

No response

Relevant log output

No response

ismayilov-ismayil commented 1 month ago

Hi @andyfisher100, thanks for reporting! We are working on more prioritized issues at the moment, but will get back to this one soon.