Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce the new cs3-python-client library #161

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

glpatcern
Copy link
Member

@glpatcern glpatcern commented Aug 10, 2024

This PR is to introduce the https://github.com/cs3org/cs3-python-client library contributed by @rawe0.

As part of this, some refactoring and simplification has taken place:

  • Simplified xattrs handling: dropped the need for an independent getxattr() API, as well as the caching recently introduced, as the xattrs are always queried next to a stat call.
  • Removed versioninv flag on stat, assuming it's always version invariant. Only xroot was able to make a distinction.
  • Standardized readfile that now raises an exception instead of yielding it. Consequently dropped the peek logic.
  • Standardized error messages.

@micbar a heads-up about a larger-than-usual change.

Remaining tasks:

  • Push cs3client >= 1.1 as requirement
  • Test with the Microsoft WOPI validator

src/core/localiface.py Fixed Show fixed Hide fixed
@glpatcern glpatcern force-pushed the cs3client branch 4 times, most recently from 64d3962 to a8217ef Compare August 10, 2024 15:20
@glpatcern glpatcern linked an issue Aug 30, 2024 that may be closed by this pull request
@glpatcern glpatcern marked this pull request as ready for review August 30, 2024 15:14
@glpatcern glpatcern changed the title WIP to use the new cs3-python-client library Introduce the new cs3-python-client library Aug 30, 2024
@glpatcern
Copy link
Member Author

Marking as ready for review given that the code is pretty much complete. Once the build passes, we can review and merge this change.

@glpatcern
Copy link
Member Author

glpatcern commented Sep 6, 2024

Remaining developments:

  • convert the code dealing with yielded exceptions from readfile(), now that the function can raise them.
  • rename exception messages (ENOENT goes into the cs3 library, EXCL_ERROR gets replaced from the library)
  • get rid of versioninv

@glpatcern
Copy link
Member Author

Following cs3org/cs3-python-client#8 we now pass the whole test suite:

$ pytest-3
============================== test session starts ===============================
platform linux -- Python 3.9.18, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: /root/WOPI
collected 20 items

test/test_storageiface.py
....................                                                                                [100%]

Therefore this is ready to review.

@glpatcern glpatcern marked this pull request as ready for review September 13, 2024 14:11
@glpatcern glpatcern force-pushed the cs3client branch 2 times, most recently from 3f24225 to e890c08 Compare September 13, 2024 14:18
@glpatcern glpatcern marked this pull request as draft September 24, 2024 15:47
@glpatcern glpatcern marked this pull request as ready for review November 5, 2024 09:49
@micbar
Copy link
Member

micbar commented Nov 18, 2024

@micbar a heads-up about a larger-than-usual change.

Thanks. We are not using this Wopiserver anymore. We have now a fully integrated and tested solution in https://github.com/owncloud/ocis/tree/master/services/collaboration

In that solution we are using the go-cs3 bindings like we also use in reva.

@glpatcern
Copy link
Member Author

Thanks. We are not using this Wopiserver anymore.

Thanks for the notice, I suspected that indeed. Will be interesting to see how that service evolves and if we could converge too, though from memory the ocis-integrated solution would not include some (non-strictly-wopi) features we use at CERN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rerfactor logic to get rid of get_xattr calls
3 participants