virtualenv requirements file using cached version #4293

Closed
maspwr opened this Issue Mar 27, 2013 · 4 comments

Projects

None yet

2 participants

@maspwr
Contributor
maspwr commented Mar 27, 2013

After updating a requirements.txt file, the version used on the minion is the old/cached version and not the new/updated version. This is when using a gitfs file backend. Code block around https://github.com/saltstack/salt/blob/develop/salt/states/virtualenv.py#L61 looks suspect, but I'm not sure exactly what the cause is yet.

           Salt: 0.13.3
         Python: 2.7.3 (default, Aug  1 2012, 05:14:39)
         Jinja2: 2.6
       M2Crypto: 0.21.1
 msgpack-python: 0.1.10
   msgpack-pure: not installed
       pycrypto: 2.4.1
         PyYAML: 3.10
          PyZMQ: 13.0.0
@maspwr
Contributor
maspwr commented Mar 27, 2013

FWIW, running the cp.is_cached, cp.hash_file, and cp.cache_file commands manually produced expected output.

@maspwr
Contributor
maspwr commented Mar 27, 2013

Whoops, it looks like I was using the pip state, not the virtualenv state. It looks like the pip module caches the requirements file and never busts the cache. See here: https://github.com/saltstack/salt/blob/develop/salt/modules/pip.py#L187.

@maspwr
Contributor
maspwr commented Mar 27, 2013

I opened a PR for this issue. I just reused the code block in the virtualenv state. Seems like some kind of utility function could be used in both locations though...

@thatch45
Member

Yes, I merged the pull req, it looks good, but we should look more closely here.

Thanks for the pull req!

@thatch45 thatch45 closed this Apr 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment