azure-pipelines-tasks: Release pipeline downloads all parent directory items when artifact when directory does not exist

Required Information

Question, Bug, or Feature?
Type: Bug

Enter Task Name: DownloadFileshareArtifacts@1

Environment

  • Server - Azure Pipelines

Agent - Private OS: Windows Server 2012 R2 Agent Version: 2.164.7

Issue Description

The DownloadFileshareArtifacts@1 task fails to find the artifact folder on the network share (in our case it seems to be a network hiccup), and instead goes to the parent directory and downloads everything inside. There are quite a lot of artifacts stored here (~60gb), so it fills up the disk space on the agent.

Task logs

2020-02-06T06:13:50.0905635Z Downloading artifact [artifact] from: [path]
2020-02-06T06:14:11.9990681Z Directory '[artifact-path]' does not exist. Falling back to parent directory: [artifact-path-parent-directory]
2020-02-06T06:14:12.0141688Z Unable to read directory [artifact-path-parent-directory]. Error: Error: ETIMEDOUT: connection timed out, scandir '[artifact-path-parent-directory]'
2020-02-06T06:14:12.0148162Z Retrying download of [artifact-name], retry count: 1
2020-02-06T06:14:22.2390062Z Downloading [artifact-path-parent-directory-first-item] to [agent-artifact-directory]

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 15 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Any progress on this one ?

Would prefer that whole task would just fail if there is no directory, as most of time parent folders contains a lot more stuff.

Maybe make it configurable - allowToUseParentFolder: true/false, with default false (or true if you want to be backwards compatible).

Stale again? Seriously? 😦

Hi @TMattes reopened it at the moment since there are some points to investigate.

I ask you to re-open this, because your fix causes unwanted behaviour: if I decide I want a specific version of my artifact / artifact from a specific build, and this artifact is not found, then I want the pipeline to fail and not to take something else out of the parent directory. Furthermore, I never want it to download everything inside the parent directory. What “fix” should this be? Please think over it and fix it - this ‘fall-back’ is a mess!