cyberdelia / heroku-geo-buildpack

Geo libraries for Heroku
https://github.com/heroku/heroku-geo-buildpack
114 stars 135 forks source link

Problems with build caching #29

Open desaperados opened 9 years ago

desaperados commented 9 years ago

I'm able to deploy first time to a new cedar-14 heroku application and to an upgraded cedar-14 application after running heroku repo:purge_cache. However, subsequent deploys are failing every time with output as below.

I'm able only able to deploy with this build pack after running heroku repo:purge_cache which suggests a caching issue. Any builds I try without clearing the build cache are failing as below:

Counting objects: 1, done.
Writing objects: 100% (1/1), 191 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... done
remote: -----> Multipack app detected
remote: =====> Downloading Buildpack: https://github.com/cyberdelia/heroku-geo-buildpack.git
remote: =====> Detected Framework: geos/gdal/proj
remote:        Using geos version: 3.4.2
remote:        Using gdal version: 1.11.1
remote:        Using proj version: 4.8.0_1
remote: -----> Vendoring geo libraries done
remote: =====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
remote: =====> Detected Framework: Ruby
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.1.3
remote: -----> Installing dependencies using 1.7.12
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:
remote:        sh: 1: Syntax error: Unterminated quoted string
remote:        Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:        /tmp/build_d39a0a0c85d065472da52a3a06eaedff/vendor/ruby-2.1.3/bin/ruby extconf.rb '--with-geos-dir=/tmp/build_23c153af77f069f851ec61ee69eb3b97/.heroku/vendor --with-geos-lib=/tmp/build_23c153af77f069f851ec61ee69eb3b97/.heroku/vendor/lib --with-proj-dir=/tmp/build_23c153af77f069f851ec61ee69eb3b97/.heroku/vendor
remote:        extconf failed, exit code 2
remote:        Gem files will remain installed in /tmp/build_d39a0a0c85d065472da52a3a06eaedff/vendor/bundle/ruby/2.1.0/bundler/gems/rgeo-490b003c4280 for inspection.
remote:        Results logged to /tmp/build_d39a0a0c85d065472da52a3a06eaedff/vendor/bundle/ruby/2.1.0/bundler/gems/extensions/x86_64-linux/2.1.0-static/rgeo-490b003c4280/gem_make.out
remote:        An error occurred while installing rgeo (0.3.20.nonrelease), and Bundler cannot
remote:        continue.
remote:        Make sure that `gem install rgeo -v '0.3.20.nonrelease'` succeeds before
remote:   
remote:        sh: 1: Syntax error: Unterminated quoted string
remote:
remote:        Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote:        /tmp/build_d39a0a0c85d065472da52a3a06eaedff/vendor/ruby-2.1.3/bin/ruby extconf.rb '--with-geos-dir=/tmp/build_23c153af77f069f851ec61ee69eb3b97/.heroku/vendor --with-geos-lib=/tmp/build_23c153af77f069f851ec61ee69eb3b97/.heroku/vendor/lib --with-proj-dir=/tmp/build_23c153af77f069f851ec61ee69eb3b97/.heroku/vendor
remote:
remote:        extconf failed, exit code 2
remote:
remote:        Gem files will remain installed in /tmp/build_d39a0a0c85d065472da52a3a06eaedff/vendor/bundle/ruby/2.1.0/bundler/gems/rgeo-490b003c4280 for inspection.
remote:        Results logged to /tmp/build_d39a0a0c85d065472da52a3a06eaedff/vendor/bundle/ruby/2.1.0/bundler/gems/extensions/x86_64-linux/2.1.0-static/rgeo-490b003c4280/gem_make.out
remote:        An error occurred while installing rgeo (0.3.20.nonrelease), and Bundler cannot
remote:        continue.
remote:        Make sure that `gem install rgeo -v '0.3.20.nonrelease'` succeeds before
remote:        bundling.
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote:
remote:  !     Push rejected, failed to compile Multipack app
desaperados commented 9 years ago

Some weird caching issue here

desaperados commented 9 years ago

Would suggest that this build pack has issues with CACHE_DIR I am only able to successfully deploy after purging the cache.

desaperados commented 9 years ago

Have tracked this down to being an issue with a non-relase version of the rgeo gem - we had rgeo locked to a particular commit in the Gemfile due to the last release being quite a bit behind master.

It would seem that the build pack doesn't correctly handle caching of non-releases.

Now using rgeo 0.4.0 which is working as expected. The issue remains but will only affect anyone trying to use a non-release version of the gem.

wikyd commented 8 years ago

Thank you -- I had this exact same problem from pinning rgeo to a specific commit. Purging fixed the issue I was seeing after upgrading to rgeo 0.4.0.