Closed dblackdblack closed 7 years ago
If you have an application or some steps with an example application that we can use to reproduce and test the fix for this issue, that would be very appreciated.
This affected us too while we've been updating from workflow 2.1 to 2.7. The issue was caused by the introduction of PYTHONPATH
in the slugbuilder Dockerfile:
Some of our projects had PYTHONPATH
set via deis config, which overrides the value set in the Dockerfile, making the builds fail with:
-----> Discovering process types
Traceback (most recent call last):
File "/bin/read_procfile_keys", line 4, in <module>
import procfile
ImportError: No module named 'procfile'
The workaround for us is just to append :/usr/local/lib/python3/site-packages
to the PYTHONPATH
we set via deis config.
This actually breaks builds with custom buildpacks from private git repos or for example ruby builds that need to clone from private repos, because the SSH_KEY environment variable is no longer present in the build environment. I had to downgrade the builder to v2.5.5 to get builds working again.
During the compile phase, heroku does not set user-specified environment variables/settings. Docs here: https://devcenter.heroku.com/articles/buildpack-api#bin-compile
In contrast, it appears that deis builder does set these variables. This is causing problems because we set PYTHONHOME and PYTHONPATH, which is causing builds to fail.
You should adhere to the heroku methodology of exposing settings in an envdir, but not actually setting them during the compile phase.