cs3org / wopiserver

A vendor-neutral application gateway compatible with the WOPI specifications.
Apache License 2.0
52 stars 27 forks source link

Implementation of EOS-supported locking #94

Closed glpatcern closed 1 year ago

glpatcern commented 1 year ago

Internal reference: https://its.cern.ch/jira/browse/CERNBOX-3016

Through validation tests, it turns out that rename operations (MoveRequest in CS3 API terms) must be supported regardless if a file is locked - edit: renames may still need a lock, regardless how Microsoft Office behaves. The test suite was amended to take that into account. Similarly, the wopiserver needs to be able to set an xattr on an unlocked file, but be denied if the file is locked and the lock does not match. This was incorporated as well in the test suite.

Validation tests:

Update: as renames were not changed, and as right now the CS3 interface on top of Reva master does not pass all the tests, we're not executing those tests. In a separate PR we will integrate such tests on the CI, with a custom GitHub runner similar to the Reva repo.

glpatcern commented 1 year ago

@micbar would you be able to test this PR against Reva edge, and run the MS WOPI validator on top?

A priori the changes and fixes to the CS3 interface are minimal, yet there is an important improvement, that is single-file shares are properly supported now (i.e. SaveAs is disabled - that was already in master - and PutRelative now fails with HTTP 501 as expected by the MS WOPI validator tests), and that is possibly useful for the OCIS GA release.

micbar commented 1 year ago

@glpatcern We need the Wopi Validator in the CI of this repo, running on every Pull Request.

See https://drone.owncloud.com/owncloud/wopi/2177/9/10 as an example.

You are using GH actions in this repo, so you would need to adapt the test code a bit.

glpatcern commented 1 year ago

@glpatcern We need the Wopi Validator in the CI of this repo, running on every Pull Request.

@micbar I agree this would be highly beneficial, but a precondition is to run the WOPI tests against a live Reva daemon (https://github.com/cs3org/wopiserver/issues/57).

See https://drone.owncloud.com/owncloud/wopi/2177/9/10 as an example.

I don't have access to your drone, maybe you can enable my GH handle?