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

Add --remove-files on tarball creation #1282

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jlanga
Copy link

@jlanga jlanga commented Nov 17, 2023

Add --remove-files on tarball creation

Description

Just added --remove-files flag to tar on the save section. This flag removes files on the fly as they are being added to the tarball.

Motivation and Context

When the cache size is too big, the elements to be cached and the tar.gz coexist at the same time, filling the disk space, and failing to produce an object.

This PR solves #1281 .

How Has This Been Tested?

By using tar on a linux machine. I created a folder and mock files, and after running tar, the folder and the files weren't there.

I ran npm run test and it passed.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (add or update README or docs)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jlanga
Copy link
Author

jlanga commented May 1, 2024

@bethanyj28 review please?

@adazem009
Copy link

adazem009 commented Jan 26, 2025

I'm having the out of space problem too.
I think you should make this the default when the cache action is used (which automatically saves cache after the workflow completes successfully), but make it optional when the restore and save actions are used because removing the files might break steps after saving.

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

Successfully merging this pull request may close these issues.

2 participants