Closed ghost closed 3 years ago
Hi guys,
got the same issue here, in Azure Devops, on MS hosted agent. But what i see is that it happends "randomly". i have just run the pipeline again , 2 jobs which contains the download steps, seems it is successfull now, but after(now) i tried another pipeline with a download task/start this same job again , it fails again.
Error: Starting: Initialize job Agent name: 'Hosted Agent' Agent machine name: 'WIN-E0GLM87UFV4' Current agent version: '2.166.4' Current image version: '20200430.2' Agent running as: 'VssAdministrator' Prepare build directory. Set build variables. Download all required tasks. Downloading task: Download (1.0.0)
Finishing: Initialize job
I encountered that as well...
Same here. The download
keyword in YAML pipelines doesnt work.
I encountered this today, switching to the DownloadPipelineArtifact task fixed this for me.
I encountered this today, switching to the DownloadPipelineArtifact task fixed this for me.
Yes, that worked for me as well. The documentation, however, says that I should be able to use the download
keyword as an alias for that task.
https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema#download
I think the keyword syntax is easier to read and follow as compared to the task which is why I opened the bug (aside from the fact that the functionality is broken). I just wish we could get a response from Microsoft on this.
I was just hit by this. But it was on a pipeline I was modifying in another area. I use the download
alias in all my pipelines and this morning is the first time I've hit it. Re-running that failed job alone several times did not alleviate it.
I wonder if it is the version that it's looking for that's wrong. I notice it's looking for 1.0.0
, but on successful runs I see that it actually uses 0.167.2
.
Dude: I think I found the cause. When I have something like this:
- download: CI
artifact: some-artifact
It fails unless CI
is in fact a defined resource in the pipeline. In my case, I had moved this step from one pipeline to another and forgot to change CI
to current
, so it was pointing at an invalid resource.
My guess is that Azure Pipelines wants to download the version of the task that matches the version of the tool used to upload it, so perhaps it tries to look up CI
to get the version of download
to install on the agent. Since CI
does not exist, instead of failing with that error, it just defaults to version 1.0.0
which does not exist. When I switch to current
as the pipeline source, it succeeds at installing 0.167.2
.
So I think this is a case of a misleading error message when download
is given the wrong inputs. It should have been this, in my case:
- download: current
artifact: some-artifact
I am seeing the error when I use variables to specify download specs, using hard coded values works. Reported to Support team as a bug.
It needs a better error message that's for sure @AArnott comment at least let me realize what went wrong.
I am seeing the error when I use variables to specify download specs, using hard coded values works. Reported to Support team as a bug.
I likewise experienced this issue using a variable for the pipeline resource identifier
like:
- download: '$(MyVariableName)'
I have not had any issues hardcoding a value of current
.
However, when I switched from using a variable to a parameter, then it worked fine:
- download: '${{ parameters.MyParameterName }}'
Not sure if it made a difference, but my usage of the download
task was within a YAML template and as part of a deployment
job.
Perhaps the value for download
is evaluated earlier in the pipeline's execution (compile-time, when the Tasks are downloaded, etc.). I worked around a similar limitation with trying to use a variable in a deployment
job's environment
value.
Hi everyone, could you please open a ticket on https://developercommunity.visualstudio.com/search?space=21 to get right eyes on it? This error message comes from sever - since this parameter should be constant in runtime to work it properly at the moment, but error message could be definitely improved for this case. Let me close this one here since it's not related to the pipeline task.
I have filed it here: https://developercommunity.visualstudio.com/t/download-task-fails-with-taskdefinitionnotfoundexc/1469872?from=email
Everyone on this thread please help vote it up.
You need the variable at compile time, thus before runtime. Therefore another syntax must be used, see variable syntax.
I had the same issue and resolved it using the above documentation, thus ${{ variables.var }}
over $(var)
.
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: DownloadPipelineArtifact
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment
Server - Azure Pipelines or TFS on-premises? Azure Pipelines
If using TFS on-premises, provide the version: N/A
If using Azure Pipelines, provide the account name, team project name, build definition name/build number: Org: DemandCreationProgram Project: DC Program Team Pipeline: data-aggregator Id: 2126
Agent - Hosted or Private:
Issue Description
During the job initialization, I get an error message that it failed to download the 'Download' task. I am trying to use the download keyword in my YAML pipeline file.
Task logs
Error logs