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

update the storageprovider recycle api #135

Merged
merged 1 commit into from
Jul 2, 2021

Conversation

C0rby
Copy link
Contributor

@C0rby C0rby commented Jun 29, 2021

Added a reference for the target resource on which the action should be executed. This is necessary because we want to be able to perform actions for specific resources in the recycle file tree and not only on the root of a deleted tree.

I started in cs3org/reva#1827 to extend the recycle/trash-bin APIs in a way that actions can be performed for specific resources in the trash-bin file tree.

It works so far but the API needs some changes.

  • ListRecycle and ListRecycleStream had neither a key nor a reference
  • RestoreRecycleItem had a key and a ref

This PR makes the Recycle API related methods consistent by adding a ref where missing and removing the key since it can be included in the reference and so we don't need to separate fields.

@labkode
Copy link
Member

labkode commented Jul 1, 2021

Hi @C0rby,
looks good, only two things:

a) keep the key field
b) do not alter the order, add reference at the end so change is backwards compatible.

For a).
EOS exposes a key and a reference for the root recycle entry ONLY.
Is not possible to restore subtrees in a consistent way.

A restore key is just a pointer to a collection of references.
For the ocfs driver, you can use the key to point to the root recycle entry and relative references to navigate the subtree.

Using the reference as a key is a hack and will add more complexity to the code when restoring a full root recycle entry vs some children of it.

@C0rby
Copy link
Contributor Author

C0rby commented Jul 1, 2021

Thanks for the feedback. I understand and will update my changes. 👍

Added a reference for the target resource on which the action should be executed. This is necessary because we want to be able to perform actions for specific resources in the recycle file tree and not only on the root of a deleted tree.
@labkode labkode merged commit 6da44cb into cs3org:main Jul 2, 2021
@C0rby C0rby deleted the update-recycle-api branch July 2, 2021 09:31
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.

2 participants