-
Notifications
You must be signed in to change notification settings - Fork 43
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
Allow setting the acl for uploaded files (s3) #204
Conversation
@emgarten As far as I understand, the aws s3 related tests are all using a real aws account? I do not have an aws account. Can you recommend what tests I can add? Thanks! |
Take this test that creates and bucket and pushes, copy it, and update it so it passes a public ACL which will effectively be the same, but still hit your code paths.
It won't run automatically as part of your PR validation, but I'll kick the regular CI validation off and verify it against a real s3 account. Are the changes working for you with scaleway? |
@emgarten Yes, it works 🙂! Right now, if the acl is not found (not a canned acl) then the acl will not be set. Is this behaviour ok for you or should that throw an error or log a warning? |
Make it fail fast and throw when it can't find the canned acl. If someone was trying to use the acl to make it private this would be something they would want to fail on. Also, it is better to make it strict to start and default it later. The other way around would be a more breaking change. |
@emgarten I bug a bit through the aws s3 sdk and realized, that there isn't an easy way to check if the acl is actually valid (or predefined). The
At the end, a single |
Does it fail on upload if the acl is invalid? I would avoid any reflection like that. |
Yes, it fails on upload (like shown in the code block). |
That's a good behavior here. I would still consider that failing fast, it just doesn't have up front validation. |
@emgarten Ok, if you are fine with the current behaviour then that's fine for me, too. I made this PR ready for final review. |
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.
The new functional test is passing along with all the others. Great work on this useful feature 🏆
Hi @emgarten,
I made some changes based on your suggestions.
Please take a look at it.
I still need to figure out how to add some tests.
Thanks!