Skip to content

Commit

Permalink
Merge pull request #5214 from kyleknap/bump-version
Browse files Browse the repository at this point in the history
[v2] Merge from develop and bump version to 2.0.15
  • Loading branch information
kyleknap authored May 19, 2020
2 parents ec6fed3 + ab85e72 commit 243f8f6
Show file tree
Hide file tree
Showing 16 changed files with 322 additions and 19 deletions.
22 changes: 22 additions & 0 deletions .changes/1.18.61.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"category": "``ecr``",
"description": "Update ecr command to latest version",
"type": "api-change"
},
{
"category": "``glue``",
"description": "Update glue command to latest version",
"type": "api-change"
},
{
"category": "``cloudformation``",
"description": "Update cloudformation command to latest version",
"type": "api-change"
},
{
"category": "``sts``",
"description": "Update sts command to latest version",
"type": "api-change"
}
]
32 changes: 32 additions & 0 deletions .changes/1.18.62.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[
{
"category": "``qldb``",
"description": "Update qldb command to latest version",
"type": "api-change"
},
{
"category": "``ecs``",
"description": "Update ecs command to latest version",
"type": "api-change"
},
{
"category": "``dynamodb``",
"description": "Update dynamodb command to latest version",
"type": "api-change"
},
{
"category": "``macie2``",
"description": "Update macie2 command to latest version",
"type": "api-change"
},
{
"category": "``chime``",
"description": "Update chime command to latest version",
"type": "api-change"
},
{
"category": "``ec2``",
"description": "Update ec2 command to latest version",
"type": "api-change"
}
]
27 changes: 27 additions & 0 deletions .changes/1.18.63.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"category": "``health``",
"description": "Update health command to latest version",
"type": "api-change"
},
{
"category": "s3",
"description": "Mute warnings for not restored glacier deep archive objects if --ignore-glacier-warnings option enabled. Fixes `#4039 <https://github.com/aws/aws-cli/issues/4039>`__",
"type": "bugfix"
},
{
"category": "``transcribe``",
"description": "Update transcribe command to latest version",
"type": "api-change"
},
{
"category": "``ec2``",
"description": "Update ec2 command to latest version",
"type": "api-change"
},
{
"category": "``chime``",
"description": "Update chime command to latest version",
"type": "api-change"
}
]
72 changes: 72 additions & 0 deletions .changes/2.0.15.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[
{
"category": "IMDS",
"description": "Use IMDSv2 for autodiscovering EC2 region. Fixes `#4976 <https://github.com/aws/aws-cli/issues/4976>`__",
"type": "enhancement"
},
{
"category": "``glue``",
"description": "Update glue command to latest version",
"type": "api-change"
},
{
"category": "``cloudformation``",
"description": "Update cloudformation command to latest version",
"type": "api-change"
},
{
"category": "``sts``",
"description": "Update sts command to latest version",
"type": "api-change"
},
{
"category": "``dynamodb``",
"description": "Update dynamodb command to latest version",
"type": "api-change"
},
{
"category": "``chime``",
"description": "Update chime command to latest version",
"type": "api-change"
},
{
"category": "``transcribe``",
"description": "Update transcribe command to latest version",
"type": "api-change"
},
{
"category": "``qldb``",
"description": "Update qldb command to latest version",
"type": "api-change"
},
{
"category": "``health``",
"description": "Update health command to latest version",
"type": "api-change"
},
{
"category": "``ec2``",
"description": "Update ec2 command to latest version",
"type": "api-change"
},
{
"category": "``ecr``",
"description": "Update ecr command to latest version",
"type": "api-change"
},
{
"category": "s3",
"description": "Mute warnings for not restored glacier deep archive objects if --ignore-glacier-warnings option enabled. Fixes `#4039 <https://github.com/aws/aws-cli/issues/4039>`__",
"type": "bugfix"
},
{
"category": "``macie2``",
"description": "Update macie2 command to latest version",
"type": "api-change"
},
{
"category": "``ecs``",
"description": "Update ecs command to latest version",
"type": "api-change"
}
]
5 changes: 0 additions & 5 deletions .changes/next-release/enhancement,-IMDS-59801.json

This file was deleted.

49 changes: 49 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
CHANGELOG
=========

2.0.15
======

* enhancement:IMDS: Use IMDSv2 for autodiscovering EC2 region. Fixes `#4976 <https://github.com/aws/aws-cli/issues/4976>`__
* api-change:``glue``: Update glue command to latest version
* api-change:``cloudformation``: Update cloudformation command to latest version
* api-change:``sts``: Update sts command to latest version
* api-change:``dynamodb``: Update dynamodb command to latest version
* api-change:``chime``: Update chime command to latest version
* api-change:``transcribe``: Update transcribe command to latest version
* api-change:``qldb``: Update qldb command to latest version
* api-change:``health``: Update health command to latest version
* api-change:``ec2``: Update ec2 command to latest version
* api-change:``ecr``: Update ecr command to latest version
* bugfix:s3: Mute warnings for not restored glacier deep archive objects if --ignore-glacier-warnings option enabled. Fixes `#4039 <https://github.com/aws/aws-cli/issues/4039>`__
* api-change:``macie2``: Update macie2 command to latest version
* api-change:``ecs``: Update ecs command to latest version


2.0.14
======

Expand Down Expand Up @@ -313,6 +332,36 @@ CHANGELOG
* feature:wizard: Added support for AWS CLI Wizards. See `#3752 <https://github.com/aws/aws-cli/issues/3752>`__.


1.18.63
=======

* api-change:``health``: Update health command to latest version
* bugfix:s3: Mute warnings for not restored glacier deep archive objects if --ignore-glacier-warnings option enabled. Fixes `#4039 <https://github.com/aws/aws-cli/issues/4039>`__
* api-change:``transcribe``: Update transcribe command to latest version
* api-change:``ec2``: Update ec2 command to latest version
* api-change:``chime``: Update chime command to latest version


1.18.62
=======

* api-change:``qldb``: Update qldb command to latest version
* api-change:``ecs``: Update ecs command to latest version
* api-change:``dynamodb``: Update dynamodb command to latest version
* api-change:``macie2``: Update macie2 command to latest version
* api-change:``chime``: Update chime command to latest version
* api-change:``ec2``: Update ec2 command to latest version


1.18.61
=======

* api-change:``ecr``: Update ecr command to latest version
* api-change:``glue``: Update glue command to latest version
* api-change:``cloudformation``: Update cloudformation command to latest version
* api-change:``sts``: Update sts command to latest version


1.18.60
=======

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__ = '2.0.14'
__version__ = '2.0.15'

#
# Get our data path to be added to botocore's search path
Expand Down
16 changes: 11 additions & 5 deletions awscli/customizations/ecs/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import os
import sys

from botocore import compat
from botocore import compat, config
from botocore.exceptions import ClientError
from awscli.compat import compat_open
from awscli.customizations.ecs import exceptions, filehelpers
Expand Down Expand Up @@ -109,22 +109,25 @@ class ECSDeploy(BasicCommand):
MSG_SUCCESS = ("Successfully deployed {task_def} to "
"service '{service}'\n")

USER_AGENT_EXTRA = 'customization/ecs-deploy'

def _run_main(self, parsed_args, parsed_globals):

register_task_def_kwargs, appspec_obj = \
self._load_file_args(parsed_args.task_definition,
parsed_args.codedeploy_appspec)

ecs_client_wrapper = ECSClient(
self._session, parsed_args, parsed_globals)
self._session, parsed_args, parsed_globals, self.USER_AGENT_EXTRA)

self.resources = self._get_resource_names(
parsed_args, ecs_client_wrapper)

codedeploy_client = self._session.create_client(
'codedeploy',
region_name=parsed_globals.region,
verify=parsed_globals.verify_ssl)
verify=parsed_globals.verify_ssl,
config=config.Config(user_agent_extra=self.USER_AGENT_EXTRA))

self._validate_code_deploy_resources(codedeploy_client)

Expand Down Expand Up @@ -400,13 +403,16 @@ def validate_deployment_group(self):


class ECSClient():
def __init__(self, session, parsed_args, parsed_globals):

def __init__(self, session, parsed_args, parsed_globals, user_agent_extra):
self._args = parsed_args
self._custom_config = config.Config(user_agent_extra=user_agent_extra)
self._client = session.create_client(
'ecs',
region_name=parsed_globals.region,
endpoint_url=parsed_globals.endpoint_url,
verify=parsed_globals.verify_ssl)
verify=parsed_globals.verify_ssl,
config=self._custom_config)

def get_service_details(self):
cluster = self._args.cluster
Expand Down
5 changes: 3 additions & 2 deletions awscli/customizations/s3/fileinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ def is_glacier_compatible(self):
return True

def _is_glacier_object(self, response_data):
glacier_storage_classes = ['GLACIER', 'DEEP_ARCHIVE']
if response_data:
if response_data.get('StorageClass') == 'GLACIER' and \
not self._is_restored(response_data):
if response_data.get('StorageClass') in glacier_storage_classes \
and not self._is_restored(response_data):
return True
return False

Expand Down
Binary file modified awscli/data/ac.index
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
# The short X.Y version.
version = '2.0'
# The full version, including alpha/beta/rc tags.
release = '2.0.14'
release = '2.0.15'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ universal = 1

[metadata]
requires-dist =
botocore==2.0.0dev18
botocore==2.0.0dev19
colorama>=0.2.5,<0.4.4
docutils>=0.10,<0.16
cryptography>=2.8.0,<=2.9.0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def find_version(*file_paths):


requires = [
'botocore==2.0.0dev18',
'botocore==2.0.0dev19',
'colorama>=0.2.5,<0.4.4',
'docutils>=0.10,<0.16',
'cryptography>=2.8.0,<=2.9.0',
Expand Down
44 changes: 44 additions & 0 deletions tests/functional/s3/test_cp_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,20 @@ def test_warns_on_glacier_incompatible_operation(self):
self.assertEqual(self.operations_called[0][0].name, 'HeadObject')
self.assertIn('GLACIER', stderr)

def test_warns_on_deep_arhive_incompatible_operation(self):
self.parsed_responses = [
{'ContentLength': '100', 'LastModified': '00:00:00Z',
'StorageClass': 'DEEP_ARCHIVE'},
]
cmdline = ('%s s3://bucket/key.txt .' % self.prefix)
_, stderr, _ = self.run_cmd(cmdline, expected_rc=2)
# There should not have been a download attempted because the
# operation was skipped because it is glacier
# deep archive incompatible.
self.assertEqual(len(self.operations_called), 1)
self.assertEqual(self.operations_called[0][0].name, 'HeadObject')
self.assertIn('GLACIER', stderr)

def test_warns_on_glacier_incompatible_operation_for_multipart_file(self):
self.parsed_responses = [
{'ContentLength': str(20 * (1024 ** 2)),
Expand All @@ -381,6 +395,21 @@ def test_warns_on_glacier_incompatible_operation_for_multipart_file(self):
self.assertEqual(self.operations_called[0][0].name, 'HeadObject')
self.assertIn('GLACIER', stderr)

def test_warns_on_deep_archive_incompatible_op_for_multipart_file(self):
self.parsed_responses = [
{'ContentLength': str(20 * (1024 ** 2)),
'LastModified': '00:00:00Z',
'StorageClass': 'DEEP_ARCHIVE'},
]
cmdline = ('%s s3://bucket/key.txt .' % self.prefix)
_, stderr, _ = self.run_cmd(cmdline, expected_rc=2)
# There should not have been a download attempted because the
# operation was skipped because it is glacier
# deep archive incompatible.
self.assertEqual(len(self.operations_called), 1)
self.assertEqual(self.operations_called[0][0].name, 'HeadObject')
self.assertIn('GLACIER', stderr)

def test_turn_off_glacier_warnings(self):
self.parsed_responses = [
{'ContentLength': str(20 * (1024 ** 2)),
Expand All @@ -396,6 +425,21 @@ def test_turn_off_glacier_warnings(self):
self.assertEqual(self.operations_called[0][0].name, 'HeadObject')
self.assertEqual('', stderr)

def test_turn_off_glacier_warnings_for_deep_archive(self):
self.parsed_responses = [
{'ContentLength': str(20 * (1024 ** 2)),
'LastModified': '00:00:00Z',
'StorageClass': 'DEEP_ARCHIVE'},
]
cmdline = (
'%s s3://bucket/key.txt . --ignore-glacier-warnings' % self.prefix)
_, stderr, _ = self.run_cmd(cmdline, expected_rc=0)
# There should not have been a download attempted because the
# operation was skipped because it is glacier incompatible.
self.assertEqual(len(self.operations_called), 1)
self.assertEqual(self.operations_called[0][0].name, 'HeadObject')
self.assertEqual('', stderr)

def test_cp_with_sse_flag(self):
full_path = self.files.create_file('foo.txt', 'contents')
cmdline = (
Expand Down
Loading

0 comments on commit 243f8f6

Please sign in to comment.