microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.44k stars 2.6k forks source link

Download pipeline artifact breaks folder structure when downloading pipeline artifact, reopened #12682 #16522

Open leinoaa opened 2 years ago

leinoaa commented 2 years ago

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@2

list here (V# not needed): https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment Server - Azure Pipelines

Agent - Private Windows agent, agent version 2.165.0

Issue Description If you are downloading a pipeline artifact (from another pipeline) and the name of the artifact is used in the folder structure of the artifact, it can cause the following issues.

Folder level removed, file renamed:

Solutions/ThisIsAnArtifactName/url.runsettings -> Solutions/ThisIsAnurl.runsettings

Folder level removed: Solutions/ThisIsAnArtifactName/Obj/... -> Solutions/ThisIsAnObj/...

So it seems that the 'artifact name' is deleted from the folder structure, which may result in lost folder-levels or changed folder names and changed file names. And the breaking only happens for only the folder that has similarities with the artifact name, rest of the folders stay as they should. Also if you check the built artifact, there the folder structure is correct. So the copying breaks it.

Task logs No logs, just observed functionality from the result.

Troubleshooting Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs No logs, just observed functionality from the result.

leinoaa commented 2 years ago

Resubmitted #12682 as other users also confirmed the issue. I think we started using a workaround for this, so haven't checked this myself in two years..

CorrenSoft commented 2 years ago

I can confirm that this is still happening.

Goffen commented 1 year ago

Yes, I can still confirm this as well..

iolalimited commented 1 year ago

Still happening but in the hope that it helps somebody else, change from using the "Download Pipeline Artifacts" task to the "Download Build Artifacts" task and the issue is no longer present.

dombarnes commented 1 year ago

Still an issue a year later. I just updated the Artifact Name in my case to get around it.

github-actions[bot] commented 6 months ago

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

abatishchev commented 6 months ago

Adding @silviuandrica. can you please help to avoid this issue from being auto-closed?