-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Adding fix for tar exiting with code 1 issue #1108
Conversation
This reverts commit 347d2e2.
The test run for verifying the same is present here - https://github.com/kotewar/learning-actions/runs/6751011211?check_suite_focus=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove non cache related package-lock.json changes.
I tried to run the same workflow for cache@v3, and it is still passing for me. Are you sure that you have tested the correct scenario? |
@anuragc617 Updated the URL with correct test link. Please refer - https://github.com/kotewar/learning-actions/runs/6751011211?check_suite_focus=true Moreover, the error only comes when there's a cache miss in ubuntu-latest. For MacOS and Windows, we'll have to open separate issues as there are files in home directory of the respective OS which our tar program cannot access. |
Yes, @kotewar my bad restore has happened for ubuntu-latest. |
@anuragc617 are you good with the changes? |
Fix for actions/cache#689
The issue is mainly happening when
~/
(i.e. the home directory) is used in the path for caching. Internally we use a sub-directory ofhome
directory as our temporary storage for our tar to get created. So if our temporary folder is a sub-directory of path that needs to be cached, we fall into an issue where the tar cannot tar itself and finds a change in its contents while it is trying to tar, which leads to the program throwing the following error (as mentioned in the issue) -To fix this, we've added an explicit exclude for the tar file in the compression command.
Also some of our package-lock.json files are outdated, have committed them as well.