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

S3 sync command incorrectly compares keys of files with spaces in their names. #718

Closed
johnboxall opened this issue Mar 22, 2014 · 8 comments · Fixed by boto/botocore#264
Assignees
Labels
bug This issue is a bug. investigating This issue is being investigated and/or work is in progress to resolve the issue.

Comments

@johnboxall
Copy link
Contributor

The aws s3 sync command incorrectly compares the keys of files with spaces:

$ mkdir test
$ echo "hellos s3" > "test/test .txt"
$ aws s3 mb s3://test
$ aws s3 sync test s3://test --debug 2>&1 | grep syncing
> ... syncing: test/test .txt -> www-test.mobify.com/test .txt, file does not exist at destination
$ aws s3 sync test s3://test --debug 2>&1 | grep syncing
> ... syncing: test/test .txt -> www-test.mobify.com/test .txt, file does not exist at destination
$ aws --version
> aws-cli/1.3.2 Python/2.7.6 Darwin/13.0.0

It seems as though in awscli.customizations.s3.comparator, the key that is generated for S3 encodes the space with "+", while the file from the local FS is not.

I believe that this is a different error than #614.

<3

@JRyanJones
Copy link

I can confirm this issue in the 1.3.2 release. Files with spaces are uploaded as such but when attempting to download, the spaces appear to be encoded as '+', yielding non-existent key errors.

@ErikEvenson
Copy link

@irfan-syed
Copy link

Same here. My sync operations from local disk to S3 are broken now because of this. This should be prioritised.

@jamesls
Copy link
Member

jamesls commented Mar 26, 2014

Looking into this...

@jamesls jamesls self-assigned this Mar 26, 2014
jamesls added a commit to jamesls/aws-cli that referenced this issue Mar 27, 2014
The root cause was in botocore which has its own tests, but
this verifies that we can upload/download/sync files with spaces
as expected.  Depends on boto/botocore#264.
@anazar
Copy link

anazar commented Mar 27, 2014

+1 also having this issue with sync

@jamesls
Copy link
Member

jamesls commented Mar 27, 2014

PR linked above should fix this. Just need a quick code review for merging.

@anazar
Copy link

anazar commented Mar 27, 2014

Thanks @jamesls !!

I'm not sure if there's a better place to ask this question but when using sync... how does it keep track of what files have been sycned? I'm planning to run a sync from one bucket to another to sync ~30million files. Sync seems to be the best solution for this that I've found. Any concerns or gotchas I should be aware of?

jamesls added a commit that referenced this issue Mar 27, 2014
* issue-718:
  Add integ tests for #718
  Use unicode escape sequence for file type
@irfan-syed
Copy link

Thanks jamesls. Is there going to be a new release for end users?

jamesls added a commit that referenced this issue Apr 1, 2014
* release-1.3.5:
  Bumping version to 1.3.5
  Update changelog with latest changes
  Fix failing test
  Fix issue with shadowed max-items arguments
  Update changelog with S3 endpoint fix
  Add s3 whitespace issues to changelog
  Bug fix for integ test on windows wiht py3
  Add integ tests for #718
  Use unicode escape sequence for file type
  Remove test with spaces
  Use larger range of random digits to avoid collisions in test
  Use unicode escape sequence for file type
  Add changelog entry for #721
  Update session to use single loader instance
  fix table output for multibyte characters
  Update changelog with 1.3.4 release notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. investigating This issue is being investigated and/or work is in progress to resolve the issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants