This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
Ignoring failed reads during tar generation #51
Closed
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.
Resolves #24
Trying to use Fourchette with our Rails app, I run in a recurrent error: Fork app was created, DB data was copied, PR message was generated, but the generated fork was showing a standard "Welcome to Heroku app..." message.
Checking logs I found there was an error during the Tarball process.
I spent one day trying everything. Checking hooks, tracing the generated urls through Fourchette methods calls, checking the Heroku's API call, deleting the Fourchette app and configuring it again... Nothing worked, we always had the same problem.
Though maybe was a naming problem, but running an
heroku run 'ls tmp'
wasn't showing any tarball file.Finally I found the cause:
This is a
tar
command error, doesn't seem to be too serious issue since is related to file reading and seems to appear randomly, and I can guess that is related to generation on tarball inside the same folder that we're compressing.So I read about how to solve it: http://www.ensode.net/roller/dheffelfinger/entry/tar_failing_with_error_message
About the
--ignore-failed-read
flag don't worry, is not a "I will ignore everything", it just:After found that I tested it aliasing
tar
totar --ignore-failed-read
with a callback at our Fourchette app:Since then it's working! Fourchette is generating correctly the forks for our PRs and we had a little party in the office 🎉
I marked that it resolves the closed Issue #24 , because even he's complaining about Node.js build, actually the cause of his build failing was the same as ours:
Our full trace: