AcademySoftwareFoundation / rez

An integrated package configuration, build and deployment system for software
https://rez.readthedocs.io
Apache License 2.0
948 stars 336 forks source link

pysvn package referenced but not included #509

Closed brentVilla closed 1 year ago

brentVilla commented 6 years ago

When running rez commands in debug mode, the svn release plugin throws the following stack trace:

% setenv REZ_DEBUG_ALL true
% rez-config local_fore
17:10:50 DEBUG    loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.bez...
17:10:50 DEBUG    loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.cmake...
17:10:50 DEBUG    loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.custom...
17:10:50 DEBUG    loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.make...
17:10:50 DEBUG    loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.rezconfig...
17:10:50 WARNING  no 'register_plugin' function at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.rezconfig
17:10:50 DEBUG    loading build_system plugin at /work/cm/rez-2/bart_scons-default/python/lib/python2.7/rezplugins/build_system: rezplugins.build_system.scons...
17:10:50 DEBUG    loading build_system plugin at /work/cm/rez-2/bart_setuptools-default/python-2.7/bart_setuptools/rezplugins/build_system: rezplugins.build_system.setuptools...
17:10:51 DEBUG    loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.git...
17:10:51 DEBUG    loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.hg...
17:10:51 DEBUG    loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.stub...
17:10:51 DEBUG    loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.svn...
17:10:51 DEBUG    Traceback (most recent call last):
  File "/rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rez/plugin_managers.py", line 124, in load_plugins
    module = loader.find_module(modname).load_module(modname)
  File "/rel/rez/third_party/python/2.7.13.x.0.0.0.1/lib/python2.7/pkgutil.py", line 246, in load_module
    mod = imp.load_module(fullname, self.file, self.filename, self.etc)
  File "/rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs/svn.py", line 7, in <module>
    import pysvn
ImportError: No module named pysvn
...

Can pysvn be bundled and deployed with the rez so that error goes away? It makes debugging easier when the user doesn't have to keep track of what errors need further investigation and what can be ignored.

instinct-vfx commented 6 years ago

pysvn is a binary extension so bundling it usually break across platforms / architectures / OS. You can control rather fine granular what errors you are getting so you could suppress plugin errors. That will not help if you want to debug a plugin though of course.

It brings up to questions that i have always been wanting to discuss:

Cheers, Thorsten

skral commented 6 years ago

I agree with Thomas. I looked into what has to be done to make rez Python 3 compatible and all the vendored packages make this already a bigger endeavour. The fewer we have, the better.

I think an installation wizard could be helpful in order to package what is truly needed for the users plans. I haven't given it too much thought though.

I don't see a need to package everything though because most of the time a small subset of functionality is actually needed.

Cheers, Sebastian

On Wed, Apr 25, 2018 at 02:41 Thorsten Kaufmann notifications@github.com wrote:

pysvn is a binary extension so bundling it usually break across platforms / architectures / OS. You can control rather fine granular what errors you are getting so you could suppress plugin errors. That will not help if you want to debug a plugin though of course.

It brings up to questions that i have always been wanting to discuss:

  • I am not so much a fan of vendoring, and this case is a good example why. Even for pure python modules there is often platform specific requirements. I would like to see dependencies managed only via package requirements and requirements.txt files. any opinions?
  • In a similar vein i was always wondering if it may be a good idea to split plugins of altogether and give them a bit of a management control in regards to enabling and disabling plugins so we can also disable built in plugins to override them with custom ones

Cheers, Thorsten

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nerdvegas/rez/issues/509#issuecomment-384177016, or mute the thread https://github.com/notifications/unsubscribe-auth/AFJeSFl5G4RwtwddaS_H5ThbdXdMgxNvks5tsBqMgaJpZM4TinDK .

-- Sent from mobile device

JeanChristopheMorinRodeoFX commented 6 years ago

Talking about the python packages installed in the vendor folder. Is there any reason to not install them via the setup.py file?

skral commented 6 years ago

I was wondering the same thing but unfortunately that wouldn't work when exposing rez as a Python package.

It might be useful to separate the required packages for the cli and for the rez Python package. This way only packages that are necessary for the rez API would need to be vendorized.

On Wed, Apr 25, 2018 at 09:20 JeanChristopheMorinRodeoFX < notifications@github.com> wrote:

Talking about the python packages installed in the vendor folder. Is there any reason to not install them via the setup.py file?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/nerdvegas/rez/issues/509#issuecomment-384283731, or mute the thread https://github.com/notifications/unsubscribe-auth/AFJeSHaUUcCz-qnB60gc1XToLi04Ccb2ks5tsHgkgaJpZM4TinDK .

-- Sent from mobile device

nerdvegas commented 6 years ago

Pysvn used to be bundled, it was removed a long time ago, I don't recall the details. I would be in favor of removing this plugin.

Anyone actually using svn, shout out please.

A

On Wed, Apr 25, 2018 at 10:24 AM, brentVilla notifications@github.com wrote:

When running rez commands in debug mode, the svn release plugin throws the following stack trace:

% setenv REZ_DEBUG_ALL true % rez-config local_fore 17:10:50 DEBUG loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.bez... 17:10:50 DEBUG loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.cmake... 17:10:50 DEBUG loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.custom... 17:10:50 DEBUG loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.make... 17:10:50 DEBUG loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.rezconfig... 17:10:50 WARNING no 'register_plugin' function at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.rezconfig 17:10:50 DEBUG loading build_system plugin at /work/cm/rez-2/bart_scons-default/python/lib/python2.7/rezplugins/build_system: rezplugins.build_system.scons... 17:10:50 DEBUG loading build_system plugin at /work/cm/rez-2/bart_setuptools-default/python-2.7/bart_setuptools/rezplugins/build_system: rezplugins.build_system.setuptools... 17:10:51 DEBUG loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.git... 17:10:51 DEBUG loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.hg... 17:10:51 DEBUG loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.stub... 17:10:51 DEBUG loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.svn... 17:10:51 DEBUG Traceback (most recent call last): File "/rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rez/plugin_managers.py", line 124, in load_plugins module = loader.find_module(modname).load_module(modname) File "/rel/rez/third_party/python/2.7.13.x.0.0.0.1/lib/python2.7/pkgutil.py", line 246, in load_module mod = imp.load_module(fullname, self.file, self.filename, self.etc) File "/rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs/svn.py", line 7, in import pysvn ImportError: No module named pysvn ...

Can pysvn be bundled and deployed with the rez so that error goes away? It makes debugging easier when the user doesn't have to keep track of what errors need further investigation and what can be ignored.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nerdvegas/rez/issues/509, or mute the thread https://github.com/notifications/unsubscribe-auth/ABjqSiM6Fn2xgQ78IhXLkth8C2Fdl0hVks5tr8JLgaJpZM4TinDK .

nerdvegas commented 6 years ago

Right, remembering now. Pysvn has binary components, that's why it isn't included.

Those vendor packages are embedded with rez because rez is not a standard python package that can simply be install with pip etc. This is because its cli tools need to work within resolved environments, which can easily invalidate rez itself (eg, py2-based rez trying to function in a py3-based env).

Right now, the rez installation actually installs into a virtualenv, so in theory we could install these packages natively into that venv, rather than packaging with rez. However, that would lock us into rez being a venv-based install, and I think this is quite possibly not a good thing. The installation as it currently stands is messy and terribly complicated, and using virtualenv also impacts on performance (I believe it's adding perhaps 1/3rd-1/2 second startup time, which is not insignificant).

"""It might be useful to separate the required packages for the cli and for the rez Python package. This way only packages that are necessary for the rez API would need to be vendorized."""

There is no difference between rez-CLI and rez-package requirements - virtually everything you can do with rez CLI, you can do with the API also (as should be the case for any half-decent piece of software!)

If I could start from scratch tomorrow I would probably shift to a microservice-based architecture and remove these dependency issues that way

A

On Tue, May 1, 2018 at 9:44 AM, Allan Johns nerdvegas@gmail.com wrote:

Pysvn used to be bundled, it was removed a long time ago, I don't recall the details. I would be in favor of removing this plugin.

Anyone actually using svn, shout out please.

A

On Wed, Apr 25, 2018 at 10:24 AM, brentVilla notifications@github.com wrote:

When running rez commands in debug mode, the svn release plugin throws the following stack trace:

% setenv REZ_DEBUG_ALL true % rez-config local_fore 17:10:50 DEBUG loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.bez... 17:10:50 DEBUG loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.cmake... 17:10:50 DEBUG loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.custom... 17:10:50 DEBUG loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.make... 17:10:50 DEBUG loading build_system plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.rezconfig... 17:10:50 WARNING no 'register_plugin' function at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/build_system: rezplugins.build_system.rezconfig 17:10:50 DEBUG loading build_system plugin at /work/cm/rez-2/bart_scons-default/python/lib/python2.7/rezplugins/build_system: rezplugins.build_system.scons... 17:10:50 DEBUG loading build_system plugin at /work/cm/rez-2/bart_setuptools-default/python-2.7/bart_setuptools/rezplugins/build_system: rezplugins.build_system.setuptools... 17:10:51 DEBUG loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.git... 17:10:51 DEBUG loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.hg... 17:10:51 DEBUG loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.stub... 17:10:51 DEBUG loading release_vcs plugin at /rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs: rezplugins.release_vcs.svn... 17:10:51 DEBUG Traceback (most recent call last): File "/rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rez/plugin_managers.py", line 124, in load_plugins module = loader.find_module(modname).load_module(modname) File "/rel/rez/third_party/python/2.7.13.x.0.0.0.1/lib/python2.7/pkgutil.py", line 246, in load_module mod = imp.load_module(fullname, self.file, self.filename, self.etc) File "/rel/third_party/rez/2.18.0/lib/python2.7/site-packages/rez-2.18.0-py2.7.egg/rezplugins/release_vcs/svn.py", line 7, in import pysvn ImportError: No module named pysvn ...

Can pysvn be bundled and deployed with the rez so that error goes away? It makes debugging easier when the user doesn't have to keep track of what errors need further investigation and what can be ignored.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nerdvegas/rez/issues/509, or mute the thread https://github.com/notifications/unsubscribe-auth/ABjqSiM6Fn2xgQ78IhXLkth8C2Fdl0hVks5tr8JLgaJpZM4TinDK .