-
Notifications
You must be signed in to change notification settings - Fork 108
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
Support Container Versioning #45
Comments
Hi Phil, thanks for the write-up! I assume your first summary of methods should be for Container, not StoredObject. My provider does not support versioning. Do you have a test account or alternatively a provider name (to get my own test account) so I can try out versioning? I would like to rename addVersioning and removeVersioning to enableVersioning and disableVersioning. Passing the Container as an argument, both for enabling and disabling sounds most in line with the current API, though I'm definitely open for discussing the option where JOSS provides some convenience. I wonder if multiple X-Versions-Location headers can be set. If not, disabling could be inferred from the active header, saving an argument. Your suggestions for the StoredObject methods make a lot of sense too. |
My provider has notified me they will enable the Object Versioning feature soon. |
That is great. I wrote up a comment yesterday but it looks like I forgot to hit the comment button. To sum up what you said in API form the Container should gain the following methods: You do not need to state the name of the versioned container when removing it. For the StoredObjects API I am not sure whether you want to introduce a Version object or if you just want to use strings. It might be interesting for listVersions() to return a Version object that contains the StoredObject the version points to. I am also not sure if all the StoredObject methods pertain to a version but many of them still do. If the API was structured this way you would not need a getPreviousVersion method. |
I think a StoredObject which is part of a versioned group, must always be capable of getting the previous or next version. A call to such a method would return another StoredObject (preferably not a String), so that you can safely call download on that one. It might be good to have a check on whether the StoredObject is in a versions container and disallow uploads. It could be that Swift already checks for this. Unable to check that, though. Since StoredObject and Container do not make a roundtrip to Swift until a method is called, the best option would probably be to build up version knowledge as soon as a version method (eg, getNextVersion) is called. If the container does not have versioning enabled, it can throw an exception. So, basically:
For good measure, I will be computer-less for the next two weeks. If you feel like giving it a try, I would love to integrate your pull request when I'm back. |
Are there any news on this? Is versioning now supported? |
The spec allows for versioning of containers: http://docs.openstack.org/developer/swift/overview_object_versioning.html
Versioning would need a few additional methods on both the Container and the StoredObject
StoredObject:
There are a few commands for StoredObjects that go along with versioning:
I can issue a pull request if that would be helpful, but I would like to hear some comments before I put anything to code.
The text was updated successfully, but these errors were encountered: