Skip to content
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

Implemented follow-symlinks feature for S3. #854

Merged
merged 3 commits into from
Jul 31, 2014
Merged

Conversation

kyleknap
Copy link
Contributor

Added unit and integration tests along with PEP8 reformatting for
the entire file.

Fixes:
#453
#781

Added unit and integration tests along with PEP8 reformatting for
the entire file.
"are followed only when uploading locally to S3. Note that S3 " \
"does not support symbolic links so contents of linked files are " \
"uploaded under name of symbolic file."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-wording suggestion:

Symbolic links are followed only when uploading to S3 from the local filesystem. Note that S3 does not support symbolic links, so the contents of the link target are uploaded under the name of the link.

@danielgtaylor
Copy link
Contributor

Looks pretty good! Just a few comments above 👍

@jamesls
Copy link
Member

jamesls commented Jul 29, 2014

This is a change of the existing behavior. While I agree that ignoring symlinks by default makes sense, we can't change the existing behavior. Let's add two options, suggested in #453, a --follow-symlink and a --no-follow-symlink option and leave the default option to --follow-symlink.

Another thing to keep in mind, if you're doing major code formatting cleanup, try to keep those in separate commits. It will make it easier for a reviewer to see the actual functional changes vs. the non functional changes.

@kyleknap
Copy link
Contributor Author

Just added --[no]-follow-symlinks options. @danielgtaylor @jamesls

@@ -147,6 +152,23 @@ def _check_paths_decoded(self, path, names):
if not isinstance(name, six.text_type):
raise FileDecodingError(path, name)

def check_ignore_file(self, path):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given this is a function that returns true/false, a name like should_ignore_file is easier to follow.

@kyleknap
Copy link
Contributor Author

Reverted handling of broken symlinks to original behavior (Fails on attempt to follow broken symlink). Edited code based on feedback. @danielgtaylor @jamesls

@jamesls
Copy link
Member

jamesls commented Jul 30, 2014

:shipit: Looks good.

@danielgtaylor
Copy link
Contributor

LGTM as well. 🚢-it!

@jamesls jamesls merged commit 6428d93 into aws:develop Jul 31, 2014
@kyleknap kyleknap deleted the sym_dev branch August 1, 2014 22:35
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this pull request Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants