Page MenuHomePhabricator

scap3 allows plugins to declare dependencies we do not support
Closed, InvalidPublic

Description

For example in branch.py from mediawiki-config:

14:07:42 WARNING  - Problem loading plugins from module: scap.plugins.branch 
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/scap/plugins/__init__.py", line 93, in load_plugins
    mod = importlib.import_module(plugin_module, "scap.plugins")
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/srv/mediawiki-staging/scap/plugins/branch.py", line 2, in <module>
    import sh
ImportError: No module named sh

That is with scap 3.4.2-1, but it affects all 3.x versions really. Tidied up the exception handling a tad in D527, but we still need a broader solution for plugin dependencies.

Event Timeline

demon added subscribers: mmodell, demon.

Known "issue," plugins (if they exist) will catch any exception and skip loading, so it's working as designed. The stacktrace makes it look super scary though, so I tidied that up in D527.

In this particular case, it's because a plugin is using a dependency we do not have. That needs a broad discussion + fix....@mmodell and I haven't figured out what's best here yet. I'm going to adjust the summary here to broaden the scope.

demon renamed this task from scap 3.4.2-1 on tin.eqiad.wmnet reports: ImportError: No module named sh to scap3 allows plugins to declare dependencies we do not support.Jan 3 2017, 9:57 PM
demon raised the priority of this task from Low to Medium.
demon updated the task description. (Show Details)