microsoft / microsoft/azure-pipelines-tasks

[BUG]: DownloadBuildArtifacts@1 warning, Please use Download Build Artifact task for downloading UNC type artifact

Open
#19,829 9 comments 3 reactions 0 assignees View on GitHub
Area: Release bug triage
Dominant language
TypeScript
Stars
3.7k
Forks
2.7k
Avg merge
2d 16h
Merged PRs (30d)
50

Description

### New issue checklist

- [X] I searched for [existing GitHub issues](https://github.com/microsoft/azure-pipelines-tasks/issues)
- [X] I read [pipeline troubleshooting guide](https://docs.microsoft.com/vsts/build-release/actions/troubleshooting)
- [X] I checked [how to collect logs](https://learn.microsoft.com/azure/devops/pipelines/troubleshooting/review-logs?view=azure-devops)

### Task name

DownloadBuildArtifacts

### Task version

1.220.0

### Issue Description

We noticed that we were using DownloadBuildArtifacts@0 while a @1 version was available. Upgrading, while doing no other changes, lead to the warning:
_Please use Download Build Artifact task for downloading UNC type artifact. https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/download-build-artifacts?view=azure-devops_

The warning message is a bit strange as we are in fact using the task mentioned and UNC type artifacts!?

Artifact was uploaded using PublishBuildArtifacts@1 which seems to match DownloadBuildArtifacts and no warning was emitted before updating to DownloadBuildArtifacts@1.

We are using Azure DevOps Server so we cannot use PublishPipelineArtifacts/DownloadPipelineArtifacts, but it would be nice to know why on-prem is kept on these older and less optimized tasks. There seems to be few changes between @0 and @1 so I guess that we could revert the change, but wonder if the @0 would be deprecated at some point.

### Environment type (Please select at least one enviroment where you face this issue)

- [X] Self-Hosted
- [ ] Microsoft Hosted
- [ ] VMSS Pool
- [ ] Container

### Azure DevOps Server type

Azure DevOps Server (Please specify exact version in the textbox below)

### Azure DevOps Server Version (if applicable)

Azure DevOps Server 2022.1 Update 1

### Operation system

Windows Server 2019

### Relevant log output

```shell
Starting: Download Artifacts: DevResults
==============================================================================
Task : Download build artifacts
Description : Download files that were saved as artifacts of a completed build
Version : 1.220.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/download-build-artifacts
==============================================================================
Download from the specified build: #622906
Download artifact to: D:\Build\Agent-01\_work\228\a
##[warning]Please use Download Build Artifact task for downloading UNC type artifact. https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/download-build-artifacts?view=azure-devops
Using default max parallelism.
Max dedup parallelism: 192
Hashtype: Dedup64K
Minimatch patterns: [\\server.com\data\xxx\yyy\zzz\**]
Pattern: **
Minimatch patterns: [**]
Applying include pattern against original list.
9 matches
9 final results
Copy file '\\server.com\data\xxx\yyy\zzz\DevResults\file.xml' to 'D:\Build\Agent-01\_work\228\a\DevResults\file.xml'

...

Downloading artifact finished.
Finishing: Download Artifacts: DevResults
```

### Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

### Repro steps

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the DownloadBuildArtifacts@1 task entry point and compare its UNC artifact handling with @0. Reproduce the warning using PublishBuildArtifacts@1, a UNC artifact, Azure DevOps Server 2022.1 Update 1, and the provided task version. Done means the warning is emitted only when appropriate and the task behavior is covered by relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.