Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DownloadBuildArtifacts extractTars code is different from the one used by ExtractFiles #16222

Closed
luiszun opened this issue Apr 30, 2022 · 1 comment

Comments

@luiszun
Copy link

luiszun commented Apr 30, 2022

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

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: DownloadBuildArtifacts

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

Environment

  • Server - Azure Pipelines

    • If using TFS on-premises, provide the version:

    • If using Azure Pipelines, provide the account name, team project name, build definition name/build number: mscatapult, buildId:806464

  • Agent - Hosted

    • If using Hosted agent, provide agent queue name: ubuntu 20.04

Issue Description

Specifically this call from DownloadBuildArtifacts:

tl.cp(`${extractedTarsPath}/.`, destination, '-r');

vs

function tarExtract(file, destinationFolder) {

Both achieve the same, yet are different. The DownloadBuildArtifacts contains a ShellJS call to cp.
in my example, we happen to use extracted_tars (the same path hardcoded in the pipelines tasks). Causing a copy at the end of files to their same destination. This triggers a bug on ShellJS that wipes out all the files contents. I reported that (which is a regression) here: shelljs/shelljs#1092

Having the same codepath on this repo would prevent people from hitting this issue in the future (or it would have been caught earlier)

In summary: DownloadBuildArtifacts with extractTars enabled is causing us to get a bunch of files without content; whereas DownloadBuildArtifacts, followed by an ExtractFiles task works fine.

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

Troubleshooting

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

Error logs

[Insert error from the logs here for a quick overview]

@luiszun
Copy link
Author

luiszun commented May 3, 2022

Closing as posted new one #16272

The auto thing run failed, trying luck again there

@luiszun luiszun closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant