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

Drop deprecated options #2165

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/20241007-drop_deprecations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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).
12 changes: 3 additions & 9 deletions plugins/modules/ecs_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
16 changes: 1 addition & 15 deletions plugins/modules/glue_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"])
Expand Down
2 changes: 0 additions & 2 deletions tests/sanity/ignore-2.15.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions tests/sanity/ignore-2.16.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions tests/sanity/ignore-2.17.txt
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
plugins/modules/ecs_cluster.py pylint:collection-deprecated-version
plugins/modules/glue_connection.py pylint:collection-deprecated-version
2 changes: 0 additions & 2 deletions tests/sanity/ignore-2.18.txt
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
plugins/modules/ecs_cluster.py pylint:collection-deprecated-version
plugins/modules/glue_connection.py pylint:collection-deprecated-version
2 changes: 0 additions & 2 deletions tests/sanity/ignore-2.19.txt
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
plugins/modules/ecs_cluster.py pylint:collection-deprecated-version
plugins/modules/glue_connection.py pylint:collection-deprecated-version
Loading