Skip to content

Prefer using GNU tar - #553

Closed
dhadka wants to merge 1 commit into
actions:mainfrom
dhadka:dhadka/gnutar
Closed

Prefer using GNU tar#553
dhadka wants to merge 1 commit into
actions:mainfrom
dhadka:dhadka/gnutar

Conversation

@dhadka

@dhadkadhadka commented Aug 10, 2020

Copy link
Copy Markdown
Contributor

Fixes a variety of actions/cache issues related to differences between BSD and GNU tar.

The old which function already scanned the system path for the executable, but would return the first hit. This change moves most of this functionality into a new method, findInPath, which will return a list of all matches on the system path. This allows the cache module to scan all available tar implementations to find GNU tar.

Fixes#552
Fixesactions/cache#362 - OS-agnostic caches miss on Windows due to different compression (caused by zstd issue)
Fixesactions/cache#315 - infinite recursion in bsdtar caused by junction points on windows
Fixesactions/cache#301 - zstd hangs when used with bsdtar

Comment threadpackages/io/src/io.ts
if (filePath) {
return filePath
}
/**

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the which method is now in findInPath. Most of the changes are just indentation...use the "hide whitespace changes" option for easier viewing.

@maxim-lobanovmaxim-lobanov mentioned this pull request Sep 4, 2020
6 tasks
let versionOutput = ''
try {
await exec.exec(`${app} --version`, [], {
await exec.exec(`"${app}" --version`, [], {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
awaitexec.exec(`"${app}" --version`,[],{
awaitexec.exec(app,['--version'],{

@smorimoto

Copy link
Copy Markdown
Contributor

@dhadka Is there any progress on this? If you are busy, I can take over this.

casey added a commit to casey/bendy that referenced this pull request Nov 19, 2020
The BSD Tar that ships with macOS has a bug that can cause it to create
empty tar files, which can cause bad caches to be created on GitHub
Actions.
An example of this error is here:
https://github.com/P3KI/bendy/pull/48/checks?check_run_id=1421741031#step:9:39
And here are a couple discussions:
actions/cache#403actions/toolkit#553
As a workaround, this patch installs GNU Tar on macos in all jobs that
use the cache. It also adds `0-` to all cache keys to make sure that
future CI builds don't hit the old, corrupted cache. This can be removed
once `Cargo.lock` changes.
@dhadka

Copy link
Copy Markdown
ContributorAuthor

Closing for #610

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants

@dhadka@smorimoto