fix: re-apply #360 with fix for recursive backup directory accumulation#369
Open
fix: re-apply #360 with fix for recursive backup directory accumulation#369
Conversation
Why? ==== In the implementation of jdx#360, users on self-hosted runners reported that mise-bin-backup-* directories were nesting recursively inside the bin/ folder, causing exponential disk growth (75GB in 20 hours). The bug was in withBinaryBackup(): when using io.cp() to restore the backup directory to an existing destination, it copies the source INTO the destination rather than replacing it. This created nested directories that got backed up on subsequent runs, compounding the problem. See: jdx#363 How? ==== - Applied fix from PR jdx#366: backup only the mise binary file itself, not the entire bin/ directory. This avoids the io.cp directory behavior entirely. - Renamed backup prefix to mise-binary-backup-* to distinguish from old contaminated backups. - Added test workflow that verifies no nested backup directories appear after multiple cache restore cycles. - Tested with act to confirm fix prevents accumulation. ---- Fixes jdx#363 Related to jdx#360 Reverted in jdx#364 Co-authored-by: Florian Fittschen <ffittschen@gmail.com>
Contributor
Author
|
Hi @jdx is this something you're interested in merging? |
Owner
|
not sure right now |
Contributor
Author
|
np, I'll leave it for now. I'm running with this fork to address my issue so it's not time-sensitive. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR re-applies #360 (monorepo cache isolation) and fixes the bug that
caused it to be reverted in #364.
Why?
In the implementation of #360, users on self-hosted runners reported that
mise-bin-backup-*directories were nesting recursively inside thebin/folder, causing exponential disk growth (75GB in 20 hours).
The bug was in
withBinaryBackup(): when usingio.cp()to restore thebackup directory to an existing destination, it copies the source INTO the
destination rather than replacing it. This created nested directories that
got backed up on subsequent runs, compounding the problem.
See: #363
How?
entire
bin/directory. This avoids theio.cpdirectory behavior entirely.mise-binary-backup-*to distinguish from oldcontaminated backups.
bin/contains only the mise binary after multiplecache restore cycles.
Fixes #363
Related to #360
Previously Reverted in #364
Co-authored-by: Florian Fittschen ffittschen@gmail.com