errbotio / errbot

Errbot is a chatbot, a daemon that connects to your favorite chat service and bring your tools and some fun into the conversation.
http://errbot.io
GNU General Public License v3.0
3.12k stars 612 forks source link

dulwich v0.20.29-30 break installation #1551

Closed nzlosh closed 2 years ago

nzlosh commented 2 years ago

In order to let us help you better, please fill out the following fields as best you can:

I am...

I am running...

Issue description

test_plugin_cycle fails to install err-helloworld plugin.

 ______________________________ test_plugin_cycle _______________________________

testbot = <errbot.backends.test.TestBot object at 0x7fe49439a200>

    def test_plugin_cycle(testbot):

        plugins = [
            "errbotio/err-helloworld",
        ]

        for plugin in plugins:
            testbot.assertInCommand(
                "!repos install {0}".format(plugin), "Installing {0}...".format(plugin)
            ),
>           assert (
                "A new plugin repository has been installed correctly from errbotio/err-helloworld"
                in testbot.pop_message(timeout=60)
            )
E           AssertionError: assert 'A new plugin repository has been installed correctly from errbotio/err-helloworld' in 'Error installing the repo: Could not load this plugin: \n https://github.com/errbotio/err-helloworld\n───────────────...──────────────────────────────────────────\n No git repository was found at https://github.com/errbotio/err-helloworld'
E            +  where 'Error installing the repo: Could not load this plugin: \n https://github.com/errbotio/err-helloworld\n───────────────...──────────────────────────────────────────\n No git repository was found at https://github.com/errbotio/err-helloworld' = <bound method TestBot.pop_message of <errbot.backends.test.TestBot object at 0x7fe49439a200>>(timeout=60)
E            +    where <bound method TestBot.pop_message of <errbot.backends.test.TestBot object at 0x7fe49439a200>> = <errbot.backends.test.TestBot object at 0x7fe49439a200>.pop_message

Steps to reproduce

Run tox unit tests.

Additional info

I have tested versions of dulwich and the error starts from version 0.20.29. Further investigation into the root cause is required.

sijis commented 2 years ago

Ohh, weird. Well have to check the changelog

sijis commented 2 years ago

Looks like there was a refactor in the clone logic

https://github.com/dulwich/dulwich/blob/master/NEWS

sijis commented 2 years ago

Issue has been fixed upstream. I've created a PR https://github.com/errbotio/errbot/pull/1553 to pin all package version in the repo. This should help with breaking changes in new versions.

sijis commented 2 years ago

Fixed in master.

fernand0 commented 2 years ago

Not sure if this is the adequate place to post this but I'm having problems with a couple of versions of python (didn't test more) and dulwich==0.20.31 Tested upgrading old errbot in python 3.8.7 and python 3.9.1

nzlosh commented 2 years ago

@fernand0 Are you getting the same error or is this a new regression you've found in the dulwich module?

fernand0 commented 2 years ago

Sorry, I'm not sure about this. Here you can see the actual error (in Python 3.9.1, clean install with no other packages installed).

Building wheels for collected packages: dulwich Building wheel for dulwich (setup.py): started Building wheel for dulwich (setup.py): finished with status 'error' error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [34 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-jsx4tj_5/dulwich_46f418273de34eeea53be8e1568d893b/setup.py", line 100, in setup(name='dulwich', File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/site-packages/setuptools/init.py", line 87, in setup return distutils.core.setup(**attrs) File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 164, in setup ok = dist.parse_command_line() File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 474, in parse_command_line args = self._parse_command_opts(parser, args) File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/site-packages/setuptools/dist.py", line 1107, in _parse_command_opts nargs = _Distribution._parse_command_opts(self, parser, args) File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 533, in _parse_command_opts cmd_class = self.get_command_class(command) File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/site-packages/setuptools/dist.py", line 954, in get_command_class self.cmdclass[command] = cmdclass = ep.load() File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/init.py", line 194, in load module = import_module(match.group('module')) File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 26, in from .macosx_libfile import calculate_macosx_platform_tag File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/site-packages/wheel/macosx_libfile.py", line 41, in import ctypes File "/home/ftricas/.pyenv/versions/3.8.7/lib/python3.8/ctypes/init.py", line 7, in from _ctypes import Union, Structure, Array ImportError: libffi.so.6: cannot open shared object file: No such file or directory [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dulwich Running setup.py clean for dulwich Failed to build dulwich

nzlosh commented 2 years ago

The error looks like a system shared object file is missing from your machine (libffi). I'm not sure if this is important but you mentioned py3.9 but the virtualenv is running in py3.8.

fernand0 commented 2 years ago

You are true. Sorry for the noise. libffi and libffi-devel are installed. It seems to be some problem with my version of python 3.8.7. With version 3.9 it has been installed and everything seems to be ok.

nzlosh commented 2 years ago

No problem, it's good you've got errbot working.