From cfbd8613f5187ddd39f7550e8639dcd9bf65c42b Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Mon, 7 Oct 2024 15:38:03 +0200 Subject: [PATCH 1/2] Drop deprecations Signed-off-by: Alina Buzachis --- .../fragments/20241007-drop_deprecations.yml | 3 +++ plugins/modules/ecs_cluster.py | 12 +++--------- plugins/modules/glue_connection.py | 16 +--------------- tests/sanity/ignore-2.15.txt | 2 -- tests/sanity/ignore-2.16.txt | 2 -- tests/sanity/ignore-2.17.txt | 2 -- tests/sanity/ignore-2.18.txt | 2 -- tests/sanity/ignore-2.19.txt | 2 -- 8 files changed, 7 insertions(+), 34 deletions(-) create mode 100644 changelogs/fragments/20241007-drop_deprecations.yml diff --git a/changelogs/fragments/20241007-drop_deprecations.yml b/changelogs/fragments/20241007-drop_deprecations.yml new file mode 100644 index 00000000000..cfff2fb9d7f --- /dev/null +++ b/changelogs/fragments/20241007-drop_deprecations.yml @@ -0,0 +1,3 @@ +eaking_changes: + - ecs_cluster - the parameter ``purge_capacity_providers`` defaults to true. (https://github.com/ansible-collections/community.aws/pull/2165). + - iam_policy - the ``connection_properties`` return key was previously deprecated and has been removed, please use ``raw_connection_properties`` instead (https://github.com/ansible-collections/community.aws/pull/2165). diff --git a/plugins/modules/ecs_cluster.py b/plugins/modules/ecs_cluster.py index 0500a27ffdb..c94095bf7b8 100644 --- a/plugins/modules/ecs_cluster.py +++ b/plugins/modules/ecs_cluster.py @@ -72,10 +72,10 @@ version_added: 5.2.0 description: - Toggle overwriting of existing capacity providers or strategy. This is needed for backwards compatibility. - - By default I(purge_capacity_providers=false). In release 9.0.0 this default will be changed to I(purge_capacity_providers=true). + - By default I(purge_capacity_providers=true). required: false type: bool - default: false + default: true extends_documentation_fragment: - amazon.aws.common.modules - amazon.aws.region.modules @@ -237,7 +237,7 @@ def main(): name=dict(required=True, type="str"), delay=dict(required=False, type="int", default=10), repeat=dict(required=False, type="int", default=10), - purge_capacity_providers=dict(required=False, type="bool", default=False), + purge_capacity_providers=dict(required=False, type="bool", default=True), capacity_providers=dict(required=False, type="list", elements="str"), capacity_provider_strategy=dict( required=False, @@ -291,12 +291,6 @@ def main(): # Unless purge_capacity_providers is true, we will not be updating the providers or strategy. if not purge_capacity_providers: - module.deprecate( - "In release 9.0.0 the default value of purge_capacity_providers will change from false to true." - " To maintain the existing behaviour explicitly set purge_capacity_providers=true", - version="9.0.0", - collection_name="community.aws", - ) cps_update_needed = False requested_cp = existing_cp requested_cps = existing_cps diff --git a/plugins/modules/glue_connection.py b/plugins/modules/glue_connection.py index f44ca8bbf76..f967fcddcdc 100644 --- a/plugins/modules/glue_connection.py +++ b/plugins/modules/glue_connection.py @@ -107,13 +107,6 @@ """ RETURN = r""" -connection_properties: - description: - - (deprecated) A dict of key-value pairs (converted to lowercase) used as parameters for this connection. - - This return key has been deprecated, and will be removed in release 9.0.0. - returned: when state is present - type: dict - sample: {'jdbc_connection_url':'jdbc:mysql://mydb:3306/databasename','username':'x','password':'y'} connection_type: description: The type of the connection. returned: when state is present @@ -332,15 +325,8 @@ def create_or_update_glue_connection(connection, connection_ec2, module, glue_co glue_connection = _await_glue_connection(connection, module) if glue_connection: - module.deprecate( - ( - "The 'connection_properties' return key is deprecated and will be replaced" - " by 'raw_connection_properties'. Both values are returned for now." - ), - version="9.0.0", - collection_name="community.aws", - ) glue_connection["RawConnectionProperties"] = glue_connection["ConnectionProperties"] + glue_connection.pop("ConnectionProperties") module.exit_json( changed=changed, **camel_dict_to_snake_dict(glue_connection or {}, ignore_list=["RawConnectionProperties"]) diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index e846a866640..67d3693df63 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -1,4 +1,2 @@ plugins/connection/aws_ssm.py yamllint:unparsable-with-libyaml # bug in ansible-test - https://github.com/ansible/ansible/issues/82353 plugins/inventory/aws_mq.py yamllint:unparsable-with-libyaml # bug in ansible-test - https://github.com/ansible/ansible/issues/82353 -plugins/modules/ecs_cluster.py pylint:collection-deprecated-version -plugins/modules/glue_connection.py pylint:collection-deprecated-version diff --git a/tests/sanity/ignore-2.16.txt b/tests/sanity/ignore-2.16.txt index e846a866640..67d3693df63 100644 --- a/tests/sanity/ignore-2.16.txt +++ b/tests/sanity/ignore-2.16.txt @@ -1,4 +1,2 @@ plugins/connection/aws_ssm.py yamllint:unparsable-with-libyaml # bug in ansible-test - https://github.com/ansible/ansible/issues/82353 plugins/inventory/aws_mq.py yamllint:unparsable-with-libyaml # bug in ansible-test - https://github.com/ansible/ansible/issues/82353 -plugins/modules/ecs_cluster.py pylint:collection-deprecated-version -plugins/modules/glue_connection.py pylint:collection-deprecated-version diff --git a/tests/sanity/ignore-2.17.txt b/tests/sanity/ignore-2.17.txt index e925c5a05f2..e69de29bb2d 100644 --- a/tests/sanity/ignore-2.17.txt +++ b/tests/sanity/ignore-2.17.txt @@ -1,2 +0,0 @@ -plugins/modules/ecs_cluster.py pylint:collection-deprecated-version -plugins/modules/glue_connection.py pylint:collection-deprecated-version diff --git a/tests/sanity/ignore-2.18.txt b/tests/sanity/ignore-2.18.txt index e925c5a05f2..e69de29bb2d 100644 --- a/tests/sanity/ignore-2.18.txt +++ b/tests/sanity/ignore-2.18.txt @@ -1,2 +0,0 @@ -plugins/modules/ecs_cluster.py pylint:collection-deprecated-version -plugins/modules/glue_connection.py pylint:collection-deprecated-version diff --git a/tests/sanity/ignore-2.19.txt b/tests/sanity/ignore-2.19.txt index e925c5a05f2..e69de29bb2d 100644 --- a/tests/sanity/ignore-2.19.txt +++ b/tests/sanity/ignore-2.19.txt @@ -1,2 +0,0 @@ -plugins/modules/ecs_cluster.py pylint:collection-deprecated-version -plugins/modules/glue_connection.py pylint:collection-deprecated-version From 2b4bd37a957b4e864f69a837987ed09ef5c4e68f Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Tue, 8 Oct 2024 13:39:19 +0200 Subject: [PATCH 2/2] Update 20241007-drop_deprecations.yml --- changelogs/fragments/20241007-drop_deprecations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/20241007-drop_deprecations.yml b/changelogs/fragments/20241007-drop_deprecations.yml index cfff2fb9d7f..fbee107af1f 100644 --- a/changelogs/fragments/20241007-drop_deprecations.yml +++ b/changelogs/fragments/20241007-drop_deprecations.yml @@ -1,3 +1,3 @@ -eaking_changes: +breaking_changes: - ecs_cluster - the parameter ``purge_capacity_providers`` defaults to true. (https://github.com/ansible-collections/community.aws/pull/2165). - iam_policy - the ``connection_properties`` return key was previously deprecated and has been removed, please use ``raw_connection_properties`` instead (https://github.com/ansible-collections/community.aws/pull/2165).