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

Option to keep tmp directory during zarf package deploy #3342

Open
MiraDSaan opened this issue Dec 17, 2024 · 1 comment
Open

Option to keep tmp directory during zarf package deploy #3342

MiraDSaan opened this issue Dec 17, 2024 · 1 comment
Labels
enhancement ✨ New feature or request

Comments

@MiraDSaan
Copy link

Is your feature request related to a problem? Please describe.

I was building a zarf package and my values file had an error. There was an extra quote in one of the files.
The zarf error message refered to a file in the zarf temporary directory, however the file was deleted when zarf completed, so I was given a link to a file that did not exist. The error message is not helpful in finding the error.

I tried using the following command in hopes the temp directory would be saved, but the tmp directory was still deleted.

zarf package deploy -l=debug --tmpdir=/tmp/test1/zarfpackage.tar.zst --confirm
...
#3: unable to load chart data: unable to parse chart values: failed to parse
             /tmp/test1/zarf-4146961286/components/chart/values/xxx-0.0.3-0: error converting YAML
             to JSON: yaml: line 15: found unexpected end of stream: 

The file /tmp/test1/zarf-4146961286/components/chart/values/xxx-0.0.3-0 no longer exists, thereby making the error message useless.

Describe the behavior you'd like

  • Given I have a zarf package
  • When I run zarf package deploy and an error occurs in which zarf prints the name of the file in the error message
  • Then zarf does NOT delete the temp directory which contains the file listed in the error message.

Describe alternatives you've considered

(optional) A clear and concise description of any alternative solutions or features you've considered.

Two alternatives I thought of:

  • Given I have a zarf package

  • When I run zarf package deploy --save-tmpdir

  • Then zarf does NOT delete the temp directory.

  • Given I have a zarf package

  • When I use the tmpdir flag during zarf package deploy --tmpdir=/tmp/mydir/

  • Then zarf does NOT delete the temp directory which contains the file listed in the error message.

Additional context

Add any other context or screenshots about the feature request here.

@MiraDSaan MiraDSaan added the enhancement ✨ New feature or request label Dec 17, 2024
@phillebaba
Copy link
Member

I think that the underlying problem you are trying to solve to debug the output will be solved by zarf-dev/proposals#9. Adding the ability to show manifest and value output would catch these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants