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

Zarf tools archiver fails to overwrite files #1339

Closed
runyontr opened this issue Feb 7, 2023 · 2 comments
Closed

Zarf tools archiver fails to overwrite files #1339

runyontr opened this issue Feb 7, 2023 · 2 comments

Comments

@runyontr
Copy link
Contributor

runyontr commented Feb 7, 2023

When bundling files and binaries into zarf packages as part of the #1144 change, the user of the command zarf tools archiver is shown as the default way to extract binaries from tarballs. e.g. here. When performing an extraction to the same location, this tool errors out.

Steps to reproduce

  1. Take a zarf package and extract the file to a location:
kind: ZarfPackageConfig
metadata:
  name: "eksctl"
  description: "Run terraform/terragrunt code"

components:
  - name: download-eksctl
    required: true
    actions:
      onDeploy:
        after:
          - cmd: zarf tools archiver decompress tmp/eksctl_Darwin_arm64.tar.gz .
          - cmd: rm -rf tmp
    files:
      # mac m1 eksctl binary
      - source: https://github.com/weaveworks/eksctl/releases/download/v0.128.0/eksctl_Darwin_arm64.tar.gz
        target: tmp/eksctl_Darwin_arm64.tar.gz

  - name: execute-eksctl
    actions:
      onDeploy:
        before:
          - cmd: "./eksctl create cluster -f cluster.yaml"
      onRemove:
        before:
          - cmd: "./eksctl delete cluster -f cluster.yaml --disable-nodegroup-eviction --wait"
$ zarf package create
$ zarf package deploy zarf-package-eksctl-arm64.tar.zst --confirm # succeeds
$ zarf package deploy zarf-package-eksctl-arm64.tar.zst --confirm
...
  ⠋  Waiting for command "zarf tools archiver decompress tmp/eksctl_Darwin_arm64.tar.gz ." (no timeout) (0s)                                                                                              
   sh [-c zarf tools archiver decompress tmp/eksctl_Darwin_arm64.tar.gz .]
     ERROR:  Unable to perform decompression
  ✔  Running command "zarf tools archiver decompress tmp/eksctl_Darwin_arm64.tar.gz ."                                                                                                                    
     ERROR:  Failed to deploy package: unable to deploy all components in this Zarf Package: unable to deploy
             component download-eksctl: unable to run component after action: command "zarf tools archiver
             decompress tmp/eksctl_Darwin_arm64.tar.gz ." failed after 0 retries
$ rm eksctl
$ zarf package deploy zarf-package-eksctl-arm64.tar.zst --confirm # succeeds
@UncleGedd
Copy link
Contributor

FYSA, I reported something similar to this issue a while ago: #858

tldr: need to update mholt/archiver but there are breaking changes

@wirewc wirewc assigned wirewc and unassigned wirewc Feb 13, 2023
@Noxsios
Copy link
Contributor

Noxsios commented Mar 7, 2024

The functionality needed here is mostly solved by #1928, closing unless there is continued need.

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

No branches or pull requests

4 participants