Skip to content

update the storageprovider recycle api - #135

Merged
labkode merged 1 commit into
cs3org:mainfrom
C0rby:update-recycle-api
Jul 2, 2021
Merged

labkode merged 1 commit into
cs3org:mainfrom
C0rby:update-recycle-api

Conversation

@C0rby

@C0rby C0rby commented Jun 29, 2021

Copy link
Copy Markdown
Contributor

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

labkode commented Jul 1, 2021

Copy link
Copy Markdown
Member

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

C0rby commented Jul 1, 2021

Copy link
Copy Markdown
Contributor Author

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.
@C0rby
C0rby force-pushed the update-recycle-api branch from 928f346 to 218e6c2 Compare July 2, 2021 09:10
@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