Fix CLEAN_VIRTUALENV usage so it actually works. #51

Closed
wants to merge 2 commits into
from

Projects

None yet

4 participants

@blaze33
blaze33 commented Jun 15, 2012

Purging the venv using the labs user_env_compile feature with the CLEAN_VIRTUALENV env var doesn't work: since commit 6aadf16 VIRTUALENV_DIRS is unassigned, so nothing gets deleted.

I made the distinction between legacy- and modern-style virtualenvs. You may not want to merge this as-is because it will move legacy-venv from /app to /app/.heroku/venv and the user will have to update PYTHONHOME.
Does bin/release force PYTHONHOME to /app/.heroku/venv/ ? In this case we don't want any legacy venv and this commit is ok.

In fact I had the opposite problem after trying to purge my virtualenv with the purge branch (as documented here: http://stackoverflow.com/a/9463068/343834), the venv was moved to /app from /app/.heroku/venv and it broke my app by not being anymore in PYTHONHOME. If you have access to heroku support requests it's the #54723.

blaze33 added some commits Jun 15, 2012
@blaze33 blaze33 Fix CLEAN_VIRTUALENV usage so it actually works. f0124cf
@blaze33 blaze33 Fix old-style virtualenv cleanup with CLEAN_VIRTUALENV.
Also remove old artifacts from cache to avoid restoring
an old-style during the next commit.
a2e7871
@travisbot

This pull request passes (merged a2e7871 into bccec5c).

@blaze33
blaze33 commented Jun 18, 2012

I added a second commit because we also need to clean CACHE_DIR.
Now this is not ideal because we restored old artifacts from the cache just to have them deleted but I don't wanted to mess up with the code by moving the cleanup block before the cache retrieval. But it works :)

@bigsassy
bigsassy commented Aug 1, 2012

Any movement on this, Kenneth?

@kennethreitz
Collaborator

There are some drastic changes to this in the pipeline, so I'm holding off for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment