command/storage: add versioning support #475
command/storage: add versioning support #475igungor merged 64 commits intopeak:masterfrom kucukaslan:support-versioning
Conversation
…sioning This commit adds "--all-versions" flag to "ls", "rm", "du" subcommands. When rm is used with "--all-versions" flag, it succesfully deletes all "versions" of object, but it DOES NOT delete any of the "Delete Markers" associated with the given key(s). For now, I'm not sure about how to handle delete markers. Whether deletion of them should be a default behaviour, or should we require another flag for them or maybe another subcommand. Similarly, we are yet to decide how or whether s5cmd will support enabling or suspending versioning. As a last note, for operations with "--all-versions" I'm using same interfaces/methods used by default. So I expect them to have similar high performance. Updates. #386, #218.
Status as of July 26 (Outdated):
BackgroundYou may refer to #386 (comment) for background of changes
|
add examples change examples to quote wildcarded strings
add examples change examples to quote wildcarded strings
add raw flag to Cat add examples GetObjectInput.VersionID should be nil not empty string when there is no version.
this change affects both cp and mv operations.
…oning * add e2e tests. for enabling/suspending Bucket Versioning Note: gofakes supports versioning only with in memory backend "This will only support versioning in the memory backend for now:" johannesboyne/gofakes3#28 (comment)
Up to date statusI've made the changes to the Command objects and url.URL I mentioned earlier. Implementation
Output formats
Tests
Google Cloud
Commentary & Known Issues & Discussion Topics
|
export "storage.isGoogleEndpoint" method
sonmezonur
left a comment
There was a problem hiding this comment.
Left some minor comments but LGTM overall. Thank you!
Our use case is very simple then the the problem that text/cases is handling. We only want first rune to be upper case, and rest to be lower case, we don't care the word breaks and we don't care any other language than English, in fact we only care words: "Suspended" and "Enabled". So it would be overkill to use that package.
If a bucket is not versioned, this delete method should also work as expected. Also rename S3.listObjectsVersion to S3.listObjectVersions to match the AWS SDK's naming
|
🥇 |
This commit adds versioning support to the s5cmd.
--all-versionsflag tols,rm,duandselectsubcommandsto apply operation on(/over) all versions of the objects.
--version-idflag tocat,cp/mv,rm,duandselectsubcommands to apply operation on(/over) a specific versions of the object.
bucket-versioncommand to configure bucket versioning. Bucket namealone returns the bucket versioning status of the bucket. Bucket versioning can
be configured with
setflag which only accepts.--rawflag tocatandselectsubcommands. It disables the wildcard operations.Note: Google Cloud Storage uses a different approach for versioning. So with current implementation, s5cmd cannot use or retrieve generation numbers . However,
bucket-versioncommand andducommand withall-versionsflag works as expected since they do not use version ids.Fixes: #218
Fixes: #386
Fixes: #539