diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6786748ee34c..602c84a1160c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 `__) +* bugfix:``aws s3``: Fix issue where ``--endpoint-url`` was being ignored + (`issue 1142 `__) + + 1.7.11 ====== diff --git a/awscli/__init__.py b/awscli/__init__.py index 182dc19c888c..6e57a97734eb 100644 --- a/awscli/__init__.py +++ b/awscli/__init__.py @@ -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 diff --git a/awscli/customizations/s3/subcommands.py b/awscli/customizations/s3/subcommands.py index ef3a31e9299e..4ceda142a742 100644 --- a/awscli/customizations/s3/subcommands.py +++ b/awscli/customizations/s3/subcommands.py @@ -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, @@ -526,7 +526,8 @@ class CpCommand(S3TransferCommand): USAGE = " or " \ "or " 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') @@ -537,7 +538,7 @@ class MvCommand(S3TransferCommand): USAGE = " or " \ "or " 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') diff --git a/awscli/customizations/s3endpoint.py b/awscli/customizations/s3endpoint.py index e51a85b7e939..dd1469657978 100644 --- a/awscli/customizations/s3endpoint.py +++ b/awscli/customizations/s3endpoint.py @@ -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) diff --git a/doc/source/conf.py b/doc/source/conf.py index 36452a2999a9..072f9d934c43 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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. diff --git a/setup.py b/setup.py index 4f99b366b0f5..72eb27dec0f3 100644 --- a/setup.py +++ b/setup.py @@ -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'] diff --git a/tests/integration/customizations/s3/test_plugin.py b/tests/integration/customizations/s3/test_plugin.py index 628041e75a61..71674d7e51cf 100644 --- a/tests/integration/customizations/s3/test_plugin.py +++ b/tests/integration/customizations/s3/test_plugin.py @@ -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() diff --git a/tests/unit/customizations/s3/test_sync_command.py b/tests/unit/customizations/s3/test_sync_command.py index a1eb5cadc2dd..4066d514de04 100644 --- a/tests/unit/customizations/s3/test_sync_command.py +++ b/tests/unit/customizations/s3/test_sync_command.py @@ -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) diff --git a/tests/unit/customizations/test_s3endpoint.py b/tests/unit/customizations/test_s3endpoint.py index 1f83f2e5b129..e36f03bd1fda 100644 --- a/tests/unit/customizations/test_s3endpoint.py +++ b/tests/unit/customizations/test_s3endpoint.py @@ -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()