Skip to content

Prefer using GNU tar - #610

Closed
smorimoto wants to merge 2 commits into
actions:mainfrom
smorimoto:cache-gnutar
Closed

smorimoto wants to merge 2 commits into
actions:mainfrom
smorimoto:cache-gnutar

Conversation

@smorimoto

@smorimoto smorimoto commented Oct 19, 2020 •

Copy link
Copy Markdown
Contributor

Note that we need to merge #609 and release the new version before merge this PR, and there are a few things to do after that.

@joshmgross

Copy link
Copy Markdown
Contributor

Using BSD tar on Windows is intentional and avoids a lot of issues with GNU tar , see actions/cache#126 for more details.

What issues are you trying to solve with GNU tar on Windows?
If we do want to support GNU tar on Windows, it should be optional and we'll need to add workarounds to make it work with Windows file paths (--force-local flag + replacing \ in paths with /).

@smorimoto

Copy link
Copy Markdown
Contributor Author

Hi, Josh! I'm so sorry for the late reply!

Yeah, I definitely remember that, but now there is a problem like actions/cache#301 with BSD tar and this PR is one of the big steps to get around it and make zstd work on Windows as well.

@smorimoto

smorimoto commented Nov 4, 2020 •

Copy link
Copy Markdown
Contributor Author

I actually didn't think it was going to be a big problem until we disabled it on Windows, but after that, I realized that actions/cache was too slow on Windows.

@dhadka

dhadka commented Nov 18, 2020

Copy link
Copy Markdown
Contributor

👋 Just investigated two issues related to BSD vs GNU tar

  1. Robustness bug - cache restore finds nothing even though cache was saved successfully (Windows) cache#465 - Changing the PATH caused the cache action to switch from BSD tar to GNU tar between the restore and save steps on Windows. Due to the ZStd issue with BSD tar on Windows, this caused it to cache miss.

  2. Unable to restore C++ artifacts in some situations cache#460 and Cached data restored from Rust's Cargo build is corrupted cache#403 - BSD tar on MacOS corrupting executables and.dylib files. Not sure why this is happening, but using GNU tar fixes the issue.

@smorimoto

Copy link
Copy Markdown
Contributor Author

Also, if you are using Cygwin. If you are using Cygwin in your workflow, it will call Cygwin's tar, which will cause an error.

@smorimoto

Copy link
Copy Markdown
Contributor Author

To address this, we need to review, merge, and release the relevant PR this depends on.

Signed-off-by: Sora Morimoto <[email protected]>
Signed-off-by: Sora Morimoto <[email protected]>
@smorimoto

Copy link
Copy Markdown
Contributor Author

I procrastinating the my work on this PR a little, but will try to get there. @joshmgross @dhadka If you can update the patch quicker, please do that yourself.

@dhadka dhadka mentioned this pull request May 3, 2021
@thboop

thboop commented May 24, 2021

Copy link
Copy Markdown
Collaborator

I'm going to close this for now, please reopen when its ready for review!

@thboop thboop closed this May 24, 2021
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.

4 participants