<div dir="ltr">Twisted does not upgrade itself, but there might be in your dockerfile some of the command which does.<div>- is there a pip install -U somewhere?</div><div>- Is there some worker build or master shell command running some pip later in the build, which could overwrite twisted in the middle of buildbot running? If so, you should separate the virtualenv of the master/worker, and the virtualenv of your builds</div><div><br></div><div><div>It will be really hard to help without the full dockerfile, or a simplify dockerfile reproducing the problem</div><div><br></div><div>Regards</div><div>Pierre</div><div><br><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 22, 2017 at 11:50 AM Francesco Di Mizio <<a href="mailto:francescodimizio@gmail.com">francescodimizio@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Hey,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">found myself in a strange situation. I do run custom schedulers that require me to hardcode the twisted version that gets installed in my bbot server container.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg">RUN pip install pyvmomi \</div><div class="gmail_msg"> bla bla .... \</div><div class="gmail_msg"> twisted==15.5.0 \</div><div class="gmail_msg"> "buildbot[bundle]==0.9.3"</div></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Now somehow I am failing to start it with </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg"> File "/usr/local/bin/twistd", line 17, in <module></div><div class="gmail_msg"> from twisted.scripts.twistd import run</div><div class="gmail_msg"> File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 13, in <module></div><div class="gmail_msg"> from twisted.application import app</div><div class="gmail_msg"> File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/application/app.py", line 17, in <module></div><div class="gmail_msg"> from twisted import copyright, plugin, logger</div><div class="gmail_msg"> File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/plugin.py", line 35, in <module></div><div class="gmail_msg"> from twisted.python import log</div><div class="gmail_msg"> File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/python/log.py", line 26, in <module></div><div class="gmail_msg"> from twisted.logger import (</div><div class="gmail_msg"> File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/logger/__init__.py", line 89, in <module></div><div class="gmail_msg"> from ._levels import InvalidLogLevelError, LogLevel</div><div class="gmail_msg"> File "/buildbot/master/.local/lib/python2.7/site-packages/twisted/logger/_levels.py", line 9, in <module></div><div class="gmail_msg"> from constantly import NamedConstant, Names</div></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Now constantly doesnt exist in the container and never did because in fact I never needed it.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">It looks like that twisted code being run is not 15.5 I've installed but a newer version. In particular the following line:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">from constantly import NamedConstant, Names<br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">was different in 15.5. As a matter of fact </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg">cat /usr/local/lib/python2.7/dist-packages/twisted/logger/_levels.py | more</div><div class="gmail_msg">....</div><div class="gmail_msg">from twisted.python.constants import NamedConstant, Names</div></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">So where the hell is /buildbot/master/.local/lib/python2.7/site-packages/twisted/logger/_levels.py coming from? Is twisted auto downloading/extracting latest Twisted itself in that folder?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks for hte help!</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Francesco</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div></div>
_______________________________________________<br class="gmail_msg">
users mailing list<br class="gmail_msg">
<a href="mailto:users@buildbot.net" class="gmail_msg" target="_blank">users@buildbot.net</a><br class="gmail_msg">
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a></blockquote></div>