-
Notifications
You must be signed in to change notification settings - Fork 233
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
command/storage: add versioning support #475
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-versions
flag tols
,rm
,du
andselect
subcommandsto apply operation on(/over) all versions of the objects.
--version-id
flag tocat
,cp
/mv
,rm
,du
andselect
subcommands to apply operation on(/over) a specific versions of the object.
bucket-version
command to configure bucket versioning. Bucket namealone returns the bucket versioning status of the bucket. Bucket versioning can
be configured with
set
flag which only accepts.--raw
flag tocat
andselect
subcommands. 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-version
command anddu
command withall-versions
flag works as expected since they do not use version ids.Fixes: #218
Fixes: #386
Fixes: #539