Skip to content

TMPDIR not properly cleaned out after multiple runs/pulls/misc #3705

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

Open
a1994sc opened this issue Apr 18, 2025 · 7 comments
Open

TMPDIR not properly cleaned out after multiple runs/pulls/misc #3705

a1994sc opened this issue Apr 18, 2025 · 7 comments

Comments

@a1994sc
Copy link
Contributor

a1994sc commented Apr 18, 2025

Describe what should be investigated or refactored

The $TMPDIR get filled with various staging parts of zarf that do not get cleaned up properly.

Additional context

$ ls $TMPDIR
test.yml        zarf-431492100  zarf-897738423  zarf-1091906704  zarf-1203438468  zarf-1502900713  zarf-1809210350  zarf-1939208001  zarf-2521010492  zarf-2542684518  zarf-2823046111  zarf-3739878045  zarf-3863847754  zarf-4268330893
zarf-183051952  zarf-720355854  zarf-974994221  zarf-1106273493  zarf-1241826381  zarf-1734318326  zarf-1893956948  zarf-2450909861  zarf-2537174603  zarf-2767991230  zarf-3312580097  zarf-3784231634  zarf-4225363707
$ du -sh $TMPDIR
63G     /tmp/play
@brandtkeller
Copy link
Member

Hey @a1994sc - is this the expected zarf-cache location? Does zarf tools clear-cache clean this up or is it a separate location?

@a1994sc
Copy link
Contributor Author

a1994sc commented Apr 18, 2025

This is not the cache, this is the the temp directory where zarf would stage the various files during a deploy or pull

@brandtkeller
Copy link
Member

Appreciate that context! Do you happen to have a scenario to reproduce this issue? I can poke around but I might be flying blind until I find the right path.

@a1994sc
Copy link
Contributor Author

a1994sc commented Apr 18, 2025

I do half wonder if you navigate to your $TMPDIR, normally /tmp, if wouldn't already have some of those left over zarf- directories. But it seems a bit random and so unless you build a couple of big packages it might not add that quickly

@a1994sc
Copy link
Contributor Author

a1994sc commented Apr 18, 2025

Image

It seems that it tends to pile-up when the zarf package process fails.

@a1994sc
Copy link
Contributor Author

a1994sc commented Apr 18, 2025

I guess that makes sense for me to have ran into, because I have been iterating on an internal project that can fail at certain points

@AustinAbro321
Copy link
Contributor

Yeah the repo is pretty inconsistent about defering the remove of utils.MakeTempDir(config.CommonOptions.TempDirectory) calls. I don't feel super strongly about it, but I would generally be okay with removing the temp directory after the operation is complete.

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

3 participants