Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Build sometimes working, sometimes not #33

Open
guybowden opened this issue Oct 21, 2015 · 14 comments
Open

Build sometimes working, sometimes not #33

guybowden opened this issue Oct 21, 2015 · 14 comments

Comments

@guybowden
Copy link

I have a cedar-14 app using this buildpack - it apparently builds fine every time, but sometimes the libraries are not present in /app/.heroku/vendors/lib

This seems to happen if I see these lines in the build log.

remote: -----> Fetching and vendoring geos
remote: -----> Fetching and vendoring gdal
remote: -----> Fetching and vendoring proj

A re-deploy fixes the issue.. I don't see those lines above, but the libraries are placed in the lib directory..

@kennethreitz
Copy link

I'm also seeing this.

@kennethreitz
Copy link

Just reviewed all the code, and everything looks relatively sane. Going to dig deeper.

@guybowden
Copy link
Author

I have tried explicitly making an /app/.heroku/vendors dir instead of using
the shell script variables but no joy. My workaround after a cache purge is
now to push an empty Python + Geo app up THEN re push my actual app. (My
actual app has a bin/post_compile script that dies if the libs aren't where
they should be so the build fails and no cache is created)

Somehow the official Python build pack manages to create the vendors dir
every time. Here's hoping!
On Mon, 8 Feb 2016 at 23:47, Kenneth Reitz [email protected] wrote:

Just reviewed all the code, and everything looks relatively sane. Going to
dig deeper.


Reply to this email directly or view it on GitHub
#33 (comment)
.

@longhotsummer
Copy link

I find the exact same thing as @guybowden - pushing an empty Python Django app that doesn't require the geo libraries to get new clean image set up, then pushing the actual app after that and everything works. Subsequent pushes work without a problem, using the cache.

@kennethreitz
Copy link

@longhotsummer
Copy link

Interesting. If that's true, then is the python buildpack not playing nicely with other buildpacks that put libraries into .heroku/vendor, or is the python buildpack allowed to do that? If so, should this buildpack put its libraries somewhere other than .heroku/vendor?

@kennethreitz
Copy link

The real problem here is the first push triggers this behavior, a "stack change". That is likely a bug.

@longhotsummer
Copy link

What sets the default STACK variable in Dokku? According to this https://github.com/heroku/heroku-buildpack-python/blob/master/bin/compile#L148 the $CACHED_PYTHON_STACK gets set to $DEFAULT_PYTHON_STACK which is cedar. Perhaps that should be $CACHED_PYTHON_STACK=$STACK

@kennethreitz
Copy link

oh, cedar-11 builds are permanently disabled now, so this appears to easily fixable. But there will be another stack in the future, so this will just come into play once more. Will need to evaluate carefully.

@kennethreitz
Copy link

Okay, I believe I have now fixed this.

@kennethreitz
Copy link

@longhotsummer your suggestion was correct :)

@kennethreitz
Copy link

So, the Python buildpack will no longer wipe the contents of .heroku/vendor on the first push of an application. I believe that was the cause of this bug.

It will still do so whenever the stack changes. This almost never happens (once every 2-3 years?).

@guybowden
Copy link
Author

Great stuff - thanks for sorting

@longhotsummer
Copy link

Brilliant, thanks @kennethreitz

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants