-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding .python-compile-env for to support exporting env vars for pip install #750
Conversation
Thanks for the PR! Now, I'm not sure adding library specific logic to the buildpack is the best route to this functionality. I think the underlying problem (environment variables created before Towards that goal, can you describe how this solves the Airflow problem in more detail? In particular:
|
Hi @CaseyFaist! We tried using the config vars first, but they don't seem to be exposed to the buildpack in the environment itself. In fact, the documentation suggests exactly that:
...So even if we wanted to use config vars, we'd still have to modify the buildpack to extract what we want, which would be very proprietary. We can't set anything in the We tried to solve this in the most proprietary software-agnostic way, if there's another way to accomplish this we're totally open to something better! |
@edmorley I read the changes in those to see what I could glean. It looks like in #639 you did more or less what we changed (if file exists, read it into environment variable). The variable we're defining is proprietary ( The bottom line is we can't use airflow 1.10 without this environment variable. There's no support in the buildpack to allow for arbitrary environment variables to be made available to |
I didn't write those PRs, nor do I have an opinion either way on this topic (and am not a Heroku employee); those links just seemed relevent to the discussion in case either of you hadn't seen them already :-) |
I got you, thanks! |
Thanks for expanding @tomasbielskis and for more context @edmorley! I hadn't seen those PRs, I'm fairly new at Heroku myself :) I <3 airflow though, so I'm glad this issue was surfaced. @lmcgrath not unpalatable - I just need to test for side effects and write some tests Build is failing b/c Travis tests need privileged creds to run. I rolled the commit over to new PR here: #751 please continue discussion over there. |
Closing in favor of #760 👍 |
I added the ability to define config variables required for
pip install
to work for airflow 1.10. Airflow now requires the environment variableSLUGIFY_USES_TEXT_UNIDECODE
to be defined and exported for app build in order for airflow to install.By creating a file
.python-compile-env
in the app source root, it will be sourced beforepip install
runs. The file simply exports environment variables: