-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add --copy-acl option to s3-to-s3 transfers #1535
Conversation
'--content-language', '--expires', '--grants', | ||
'--only-show-errors', '--expected-size', | ||
'--page-size', '--metadata-directive', | ||
'--ignore-glacier-warnings'] |
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.
Haven't really looked into the whole PR yet, but are you using TAB here? Using SPACE would save you from the indentation trouble like this. Besides, I would suggest you simply add a new line in the middle with your new addition, and leave all other pre-existing lines intact. Don't bother re-paragraph them.
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.
Oops, sorry that last line did end up with tabs somehow (I resolved a merge conflict and I think the merge tool may have been configured for tabs). Everywhere else is spaces.
I'll fix this, and add the new options to the end as you suggest.
You'll need to add tests before we can accept this. In addition I'm -1 on adding both |
@JordonPhillips Having both I'll look into adding some tests as well. |
👍 |
@nikmolnar any movement on this PR? |
@robguilfoyle I've addressed all issues so far... just waiting for further feedback from the committers. |
right on, thanks for you work on this project |
I haven't heard anything on this for a while. Is there anything I can do to move it forward? |
src_acl = self.client.get_object_acl(Bucket=src_bucket, Key=src_key) | ||
acl = {'Grants': src_acl['Grants'], 'Owner': src_acl['Owner']} | ||
|
||
# The `get_object_acl` method doesn't return 'Type', which is required |
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.
This should be fixed now in botocore, you should be able to access Type
now.
@kyleknap @mtdowling @rayluo @JordonPhillips Thoughts on this? Code wise I think this looks find (with a few small changes). I think the main hesitation is that this essentially triples the number of API calls you make (copy_object vs. copy_object, get_object_acl, put_object_acl), i.e 3x more costly from a request price standpoint. I see the docs in this PR clearly call this out, but I'd like to see what others think. We'd probably also want to add an integration test in Probably worth testing that |
Two more additional pieces of feedback:
|
@jamesls Thanks for the feedback. I'll look into the problem with multipart copies, and incorporating the recent fixes to botocore with respect to As for the name, and the possibility for similar flags, it seems reasonable to look at |
I would love to have this functionality. Thank for you for writing it. |
Ok, I've added support for multipart copies, and removed the workaround for grantee |
I, for one, welcome our new ACL overlords. Thanks @nikmolnar |
so what has to happen for this to get merged? |
Guys, seriously, why are you holding this back? I have no idea, why would you want to do that. It doesn't break any existing functionality, it doesn't change any core features or behavior. Instead, it adds functionality that is desirable by a lot of people. Yes, it also adds some overhead, but since the S3 is designed in a way, that copying keys with ACLs requires additional requests, that's what we get and what cannot be changed. |
@jamesls do you know what needs to be done to get @nikmolnar 's useful work merged? |
Yes this is functionality that we do want in the CLI. So I think the main issue is that the s3 command code base is in a bit of a flux right now, we are currently working to port There are two options: Merge the current PR as is and do not wait on s3transfer:
Wait till s3transfer gets merged in:
In the end, I do not think it matters too much on what path we choose here, but things that must happen are the following:
Once these are done, I think we will be in a good state to merge it. No matter in the end if the PR is used or not, the functionality will need to be ported to I think I would prefer we wait till Let me know what you all think. |
Thanks for the detailed response @kyleknap . I would defer to @nikmolnar about the best way to proceed, as I'm not the original author. In the meantime, I'll use this branch, which is, admittedly, a 😿 approach. Cheers. |
@kyleknap What is the current ETA for porting |
@nikmolnar while I cannot give an exact date I would say the work is in terms of weeks. The current port branch is integrate-s3transfer. I am currently working on getting |
HI, I am looking for this exact functionality for a while now. Is this still on the road map, and if so any idea when it might be available? |
👍 for merging this. Much needed functionality. Any updates? |
Agreed with @baburdick -- it's been 3 more months, what's up? |
Is there any progress on this? |
@nikmolnar if the target S3 not same with source S3, the owner field of acl maybe not work. to please review |
@kyleknap Re: "There are two options:" Must they be mutually exclusive? Or has progress been made in the s3transfer branch such that it's not worth doing the first option? Our use case uses 'sync' for what it's worth. @nikmolnar Any status on there rebase? |
Any status on this pull request? It would be super useful. |
This PR should probably be closed. At this point, I'm guessing that |
@nikmolnar: Are you referring to these?: #2251 , c86e5e2 , #2239 |
@baburdick: Yes, and also @kyleknap's comments earlier in this thread:
|
This PR is now quite obsolete. Closing. |
For anyone else coming here, I was able to use this to copy one bucket to another and keep ACLs: https://github.com/cobbzilla/s3s3mirror/tree/2.1-stable It's also significantly faster. |
Hi, @nikmolnar I searched for the |
@Rovel: unfortunately, this PR is obsolete. Since |
thanks for the info @nikmolnar |
Could we have a comment on the solution to the problem irregardless if this PR is obsolete? maybe from someone in the development team ? I mean, that @nikmolnar PR would have solved a lot of problems. Seems like the problem has been acknowledged and going from "merging in the next weeks" to "sorry won't ever merge" should not be the end. Maybe there's already a solution in place that could be pointed at from this issue. |
* feat: colors for deploy command * lint: fixes
This PR addresses issue #901 by adding a
--copy-acl
option to thes3 sync
,s3 cp
, ands3 mv
commands.