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 #16272

Closed
luiszun opened this issue May 3, 2022 · 1 comment
Labels

Comments

@luiszun
Copy link

luiszun commented May 3, 2022

Question, Bug, or Feature?
Type: Bug

Enter Task Name: DownloadBuildArtifacts

Environment

  • Server - Azure Pipelines

    • If using Azure Pipelines, provide the account name, team project name, build definition name/build number: mscatapult, buildId:806464
  • Agent - Hosted or Private: 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.

@github-actions
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant