heroku / heroku-repo

Plugin for heroku CLI that can manipulate the repo
MIT License
686 stars 111 forks source link

Error: stdin: not in gzip format #57

Closed vjancik closed 6 years ago

vjancik commented 8 years ago
heroku repo:purge_cache -a <app_name>
Running set -e
mkdir -p tmp/repo_tmp/unpack
cd tmp/repo_tmp
curl -o repo-cache.tgz 'https://s3-external-1.amazonaws.com/heroku_repos/heroku.com/cache/50426239.tgz?AWSAccessKeyId=AKIAJWLOWWHPBWQOPJZQ&Signature=fhUvfScUFQdHObCDJeppUfc%2BNHQ%3D&Expires=1469466868'
cd unpack
tar -zxf ../repo-cache.tgz
METADATA="vendor/heroku"
if [ -d "$METADATA" ]; then
  TMPDIR=`mktemp -d`
  cp -rf $METADATA $TMPDIR
fi
cd ..
rm -rf unpack
mkdir unpack
cd unpack
TMPDATA="$TMPDIR/heroku"
VENDOR="vendor"
if [ -d "$TMPDATA" ]; then
  mkdir $VENDOR
  cp -rf $TMPDATA $VENDOR
  rm -rf $TMPDIR
fi
tar -zcf ../cache-repack.tgz .
curl -o /dev/null --upload-file ../cache-repack.tgz 'https://s3-external-1.amazonaws.com/heroku_repos/heroku.com/cache/50426239.tgz?AWSAccessKeyId=AKIAJWLOWWHPBWQOPJZQ&Signature=AAUgaNOWZWlUWahE6AaMweH1smo%3D&Expires=1469466869'
exit on ⬢ <app_name>... up, run.9157
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   300    0   300    0     0   2767      0 --:--:-- --:--:-- --:--:--  2803

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

I suspect something changed with the AWS API, because when you access the URL, you get an XML error response.

jdx commented 8 years ago

I bet the app is just empty, but the error message could probably be clearer here.

vjancik commented 8 years ago

How do you mean empty? My cache is definitely not empty.

jdx commented 8 years ago

That's definitely how it behaves if there hasn't been a git push. You might have to submit a support ticket if that's not the case so the build team can look at it directly.

edmorley commented 6 years ago

Similar to #36, this is fixed in the new builds:cache:purge command added to heroku-builds that is replacing the repo:purge_cache command in this repo (see #77).

As such, I think this can now be closed.

dmathieu commented 6 years ago

Thank you @edmorley