Storage versioning
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
A more detailed plan after https://github.com/nextcloud/server/issues/9445 and now that https://github.com/nextcloud/server/pull/12129 is in we can look at this in a bit more depth.
I think it is important to make a distinction here. The implementation in https://github.com/nextcloud/server/pull/12129 is to allow version backends. Which is why we have versions in group folders for example.
This is about adding versioning support on a storage level.
I'd propose a new interface to be implemented by storages. IVersionStorage. This should at least have a method versioningEnabled (or something similar). Because it might not always be available (e.g. S3 versiniong).
Then this would need the following methods I think
getVersions(string $path): IVersion[]: obtains a list of the current versionscreateVersion(string $path): creates a new version (this can also be a void method if that happens automatically on write?)restore(IVersion $version): bool: restores the version
Then IVersion needs
- size
- time
- id
- mime?
That way we could use it in combination with #12129
@icewind1991 for feedback.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading issue #9445 and pull request #12129 to understand the existing version-backend implementation. Then review the proposed IVersionStorage and IVersion methods and determine the supported storage behaviors and API shape. Done means the storage-level versioning design is agreed and its implementation scope is clearly defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100