Open hbuckle opened 3 years ago
Any light on this? It is quite annoying to download the same tool for multiple packages in single pipeline, the execution is totally random due to this sometimes even taking 5 minutes to download the ArtifactTool.
I too have been encountering the issue. We are using self hosted Ubuntu-18.04 Linux agents. The task usually takes between 2-6 minutes. It also often hangs for much longer periods (Last instance was ~15 minutes).
==============================================================================
Task : Universal packages
Description : Download or publish Universal Packages
Version : 0.182.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks
==============================================================================
SYSTEMVSSCONNECTION exists true
Downloading: https://0t3vsblobprodcus362.vsblob.vsassets.io/artifacttool/artifacttool-linux-x64-Release_0.2.189.zip?sv=2019-07-07&sr=b&sig=zKsrxCSH0w92RidiftILYZv4YgCdCAU2LWGBMFMl4t4%3D&spr=https&se=2021-05-18T20%3A49%3A03Z&sp=r&P1=1621370643&P2=11&P3=2&P4=G5pC2%2fIcIwXoBqrglvY54BNzQczRp7kZshrFQNN4FZE%3d
Caching tool: ArtifactTool 0.2.189 x64
This is pretty much the log every time the task is run. It doesn't look like the package is being cached correctly. The download appears to be attempted every time, and the time it takes to normally complete randomly varies. The resolution of this issue would greatly improve pipeline build times.
I noticed that the identifier used for caching the tool is inconsistent:
In UniversalPackagesV0 it's passed as lowercase artifacttool
:
Which is later used in ArtifactToolUtilities
to read from the cache:
However, when writing to cache, it's hardcoded as capitalised ArtifactTool
:
It occurs to me that an operating system using case sensitive paths may never get a cache hit.
I can confirm that it's a case sensitivity issue as symlinking /agent/_work/_tool/ArtifactTool
and /agent/_work/_tool/artifacttool
on our build agents allowed it to use the cached copy for me.
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
Not stale - still needs fixing
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
Still not stale - still needs fixing
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
Not stale, someone should review the linked PR
This is still an issue, 2 and a half years later. Can someone please look into it?
Workaround:
go to azagent/_work/_tool/
and run
ln -s ArtifactTool artifacttool
This problem still exists.
I can also confirm that the workaround mentioned by @ecrowe-aridhia and @nickidw works on our self-hosted Ubuntu-22.04 agents. We saved a minimum of 10-11 seconds on each of our pipelines (uploading artifact) and releases (downloading artifact).
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: UniversalPackages@0
Environment
Server - Azure Pipelines
Agent - Hosted:
Issue Description
When running a build on a windows agent (
windows-2019
) with multiple UniversalPackages tasks the first task downloads the ArtifactTool and subsequent tasks use the cached version. Running the same build on the Linux agent the ArtifactTool is downloaded every time the UniversalPackage task runs.Task logs
Windows task first instance:
Windows task second instance:
Linux task first instance:
Linux task second instance: