This project is archived. Its data is read-only.
test_pip_install fails when two different versions of cffi library are installed
The test tests/integration/test_pip.py::test_pip_install will fail if cffi is a different version than what salt's requirements are installing. When it tries to install PyOpenSSL, which also installs cffi, we see this error: ``` "[ERROR ] stderr: ERROR: pip's dependency resolver does not " 'currently take into account all the packages that are installed. ' 'This behaviour is the source of the following dependency ' 'conflicts.\n' 'salt 3002.2-409-g8648d137de requires cffi==1.14.3, but you have ' 'cffi 1.14.4 which is incompatible.\n' 'salt 3002.2-409-g8648d137de requires cryptography==3.2, but you ' 'have cryptography 3.3.1 which is incompatible.\n' 'salt 3002.2-409-g8648d137de requires pycparser==2.17, but you have ' 'pycparser 2.20 which is incompatible.\n' 'Distribution pyopenssl==19-1-0 was not found installed\n' '[ERROR ] retcode: 1\n', ``` it ends up installing the newer versions of those libraries in pypath and when you run salt you then get this error: ``` ' File "cffi/api.py", line 56, in __init__\n' "Exception: Version mismatch: this is the 'cffi' package version " "1.14.3, located in '/opt/saltstack/salt/run/cffi/api.pyc'. When " "we import the top-level '_cffi_backend' extension module, we get " 'version 1.14.4, located in ' "'/opt/saltstack/salt/pypath/_cffi_backend.cpython-37m-x86_64-linux-gnu.so'. " 'The two versions should be equal; check your installation.\n', ``` We think the fix will be editing pytinstallers loader at runtime to use our custom pypath most likely being done in tiamat-pip.
issue