Skip to content

Commit

Permalink
Merge branch 'release-1.7.12' into develop
Browse files Browse the repository at this point in the history
* release-1.7.12:
  Bumping version to 1.7.12
  Update changelog with service updates
  Bumped CLI dependancy of bcdoc
  Add #1172 to the changelog
  Honor --endpoint-url in s3/s3api commands
  Remove unnecessary --recursive from sync command
  • Loading branch information
AWS committed Feb 24, 2015
2 parents ee499af + 631ab7d commit a54c0c3
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 9 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
CHANGELOG
=========

1.7.12
======

* feature:``aws datapipeline``: Add support for tagging.
* feature:``aws route53``: Add support for listing hosted zones by name and
getting the hosted zone count.
* bugfix:``aws s3 sync``: Remove ``--recursive`` parameter. The ``sync``
command is always a recursive operation meaning the inclusion or
exclusion of ``--recursive`` had no effect on the ``sync`` command.
(`issue 1171 <https://github.com/aws/aws-cli/pull/1168>`__)
* bugfix:``aws s3``: Fix issue where ``--endpoint-url`` was being ignored
(`issue 1142 <https://github.com/aws/aws-cli/pull/1172>`__)


1.7.11
======

Expand Down
2 changes: 1 addition & 1 deletion awscli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""
import os

__version__ = '1.7.11'
__version__ = '1.7.12'

#
# Get our data path to be added to botocore's search path
Expand Down
7 changes: 4 additions & 3 deletions awscli/customizations/s3/subcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
'Using a lower value may help if an operation times out.')}


TRANSFER_ARGS = [DRYRUN, QUIET, RECURSIVE, INCLUDE, EXCLUDE, ACL,
TRANSFER_ARGS = [DRYRUN, QUIET, INCLUDE, EXCLUDE, ACL,
FOLLOW_SYMLINKS, NO_FOLLOW_SYMLINKS, NO_GUESS_MIME_TYPE,
SSE, STORAGE_CLASS, GRANTS, WEBSITE_REDIRECT, CONTENT_TYPE,
CACHE_CONTROL, CONTENT_DISPOSITION, CONTENT_ENCODING,
Expand Down Expand Up @@ -526,7 +526,8 @@ class CpCommand(S3TransferCommand):
USAGE = "<LocalPath> <S3Path> or <S3Path> <LocalPath> " \
"or <S3Path> <S3Path>"
ARG_TABLE = [{'name': 'paths', 'nargs': 2, 'positional_arg': True,
'synopsis': USAGE}] + TRANSFER_ARGS + [EXPECTED_SIZE]
'synopsis': USAGE}] + TRANSFER_ARGS + \
[EXPECTED_SIZE, RECURSIVE]
EXAMPLES = BasicCommand.FROM_FILE('s3/cp.rst')


Expand All @@ -537,7 +538,7 @@ class MvCommand(S3TransferCommand):
USAGE = "<LocalPath> <S3Path> or <S3Path> <LocalPath> " \
"or <S3Path> <S3Path>"
ARG_TABLE = [{'name': 'paths', 'nargs': 2, 'positional_arg': True,
'synopsis': USAGE}] + TRANSFER_ARGS
'synopsis': USAGE}] + TRANSFER_ARGS + [RECURSIVE]
EXAMPLES = BasicCommand.FROM_FILE('s3/mv.rst')


Expand Down
2 changes: 1 addition & 1 deletion awscli/customizations/s3endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def on_top_level_args_parsed(parsed_args, event_handler, **kwargs):
# is disabled.
if parsed_args.command in ['s3', 's3api'] and \
parsed_args.endpoint_url is not None:
event_handler.unregister('before-auth.s3', fix_s3_host)
event_handler.unregister('before-sign.s3', fix_s3_host)
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# The short X.Y version.
version = '1.7.'
# The full version, including alpha/beta/rc tags.
release = '1.7.11'
release = '1.7.12'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import awscli


requires = ['botocore>=0.92.0,<0.93.0',
'bcdoc>=0.12.0,<0.13.0',
requires = ['botocore>=0.93.0,<0.94.0',
'bcdoc>=0.13.0,<0.14.0',
'colorama>=0.2.5,<=0.3.3',
'docutils>=0.10',
'rsa>=3.1.2,<=3.1.4']
Expand Down
20 changes: 20 additions & 0 deletions tests/integration/customizations/s3/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,5 +1636,25 @@ def test_no_sign_request(self):
self.assert_no_errors(p)


class TestHonorsEndpointUrl(BaseS3CLICommand):
def test_verify_endpoint_url_is_used(self):
# We're going to verify this indirectly by looking at the
# debug logs. The endpoint url we specify should be in the
# debug logs, and the endpoint url that botocore would have
# used if we didn't provide the endpoint-url should not
# be in the debug logs. The other alternative is to actually
# watch what connections are made in the process, which is not
# easy.
p = aws('s3 ls s3://dnscompat/ '
'--endpoint-url http://localhost:51515 '
'--debug')
debug_logs = p.stderr
original_hostname = 'dnscompat.s3.amazonaws.com'
expected = 'localhost'
self.assertNotIn(original_hostname, debug_logs,
'--endpoint-url is being ignored in s3 commands.')
self.assertIn(expected, debug_logs)


if __name__ == "__main__":
unittest.main()
5 changes: 5 additions & 0 deletions tests/unit/customizations/s3/test_sync_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ def test_website_redirect_ignore_paramfile(self):
self.operations_called[1][1]['website_redirect_location'],
'http://someserver'
)

def test_no_recursive_option(self):
cmdline = '. s3://mybucket --recursive'
# Return code will be 2 for invalid parameter ``--recursive``
self.run_cmd(cmdline, expected_rc=2)
2 changes: 1 addition & 1 deletion tests/unit/customizations/test_s3endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_endpoint_url_unregisters_fix_s3_host(self):
args.command = 's3'
event_handler = mock.Mock()
on_top_level_args_parsed(args, event_handler)
event_handler.unregister.assert_called_with('before-auth.s3', fix_s3_host)
event_handler.unregister.assert_called_with('before-sign.s3', fix_s3_host)

def test_unregister_not_called_for_no_endpoint(self):
args = mock.Mock()
Expand Down

0 comments on commit a54c0c3

Please sign in to comment.