datalad / datalad-fuse

DataLad extension to provide FUSE file system access
Other
1 stars 4 forks source link

Test started to fail on cron jobs: OSError: Unable to find libfuse #89

Closed yarikoptic closed 1 year ago

yarikoptic commented 1 year ago
py3 run-test: commands[1] | coverage run -m pytest datalad_fuse
ImportError while loading conftest '/home/runner/work/datalad-fuse/datalad-fuse/datalad_fuse/tests/conftest.py'.
datalad_fuse/__init__.py:18: in <module>
    from fuse import FUSE
.tox/py3/lib/python3.7/site-packages/fuse.py:115: in <module>
    raise EnvironmentError('Unable to find libfuse')
E   OSError: Unable to find libfuse
ERROR: InvocationError for command /home/runner/work/datalad-fuse/datalad-fuse/.tox/py3/bin/coverage run -m pytest datalad_fuse (exited with code 4)

I think there might have been ubuntu base change on github actions recently. Started to fail 3 days ago according to https://github.com/datalad/datalad-fuse/actions

jwodder commented 1 year ago

@yarikoptic The problem is that importing datalad_fuse for any reason (including to run the non-FUSE tests) causes fuse to be imported, and that errors if it can't find an installed FUSE library. Apparently, the recent update of ubuntu-latest from 20.04 to 22.04 resulted in an appropriate FUSE library no longer being pre-installed.

Do you want datalad-fuse to be completely unusable without a FUSE library installed, or should the relevant imports in __init__.py be delayed by moving them under FuseFS.__call__?

yarikoptic commented 1 year ago

20.04 to 22.04 resulted in an appropriate FUSE library no longer being pre-installed.

Do you want datalad-fuse to be completely unusable without a FUSE library installed, or should the relevant imports in __init__.py be delayed by moving them under FuseFS.__call__?

we do have pure fsspec code so indeed would be useful to allow use without fuse installed and that is partially why we have --libfuse mode of testing and dedicated workflow, right? so let's indeed delay import if that is what is needed.