Skip to content

Conversation

@p3ck
Copy link
Collaborator

@p3ck p3ck commented May 27, 2025

SUMMARY

Remove deprectaed code since ansible-2.9 has been EOL

Ansible-2.9 has been End of Life since May 23, 2022.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/modules/azure_rm_aks_info.py
plugins/modules/azure_rm_aksversion_info.py
plugins/modules/azure_rm_applicationsecuritygroup_info.py
plugins/modules/azure_rm_appserviceplan_info.py
plugins/modules/azure_rm_automationaccount_info.py
plugins/modules/azure_rm_autoscale_info.py
plugins/modules/azure_rm_availabilityset_info.py
plugins/modules/azure_rm_cdnendpoint_info.py
plugins/modules/azure_rm_cdnprofile_info.py
plugins/modules/azure_rm_containerinstance_info.py
plugins/modules/azure_rm_containerregistry_info.py
plugins/modules/azure_rm_cosmosdbaccount_info.py
plugins/modules/azure_rm_deployment_info.py
plugins/modules/azure_rm_devtestlab_info.py
plugins/modules/azure_rm_devtestlabarmtemplate_info.py
plugins/modules/azure_rm_devtestlabartifactsource_info.py
plugins/modules/azure_rm_devtestlabcustomimage_info.py
plugins/modules/azure_rm_devtestlabenvironment_info.py
plugins/modules/azure_rm_devtestlabpolicy_info.py
plugins/modules/azure_rm_devtestlabschedule_info.py
plugins/modules/azure_rm_devtestlabvirtualmachine_info.py
plugins/modules/azure_rm_devtestlabvirtualnetwork_info.py
plugins/modules/azure_rm_dnsrecordset_info.py
plugins/modules/azure_rm_dnszone_info.py
plugins/modules/azure_rm_functionapp_info.py
plugins/modules/azure_rm_hdinsightcluster_info.py
plugins/modules/azure_rm_image_info.py
plugins/modules/azure_rm_loadbalancer_info.py
plugins/modules/azure_rm_lock_info.py
plugins/modules/azure_rm_loganalyticsworkspace_info.py
plugins/modules/azure_rm_mariadbconfiguration_info.py
plugins/modules/azure_rm_mariadbdatabase_info.py
plugins/modules/azure_rm_mariadbfirewallrule_info.py
plugins/modules/azure_rm_mariadbserver_info.py
plugins/modules/azure_rm_mysqlconfiguration_info.py
plugins/modules/azure_rm_mysqldatabase_info.py
plugins/modules/azure_rm_mysqlfirewallrule_info.py
plugins/modules/azure_rm_mysqlserver_info.py
plugins/modules/azure_rm_networkinterface_info.py
plugins/modules/azure_rm_postgresqlconfiguration_info.py
plugins/modules/azure_rm_postgresqldatabase_info.py
plugins/modules/azure_rm_postgresqlfirewallrule_info.py
plugins/modules/azure_rm_postgresqlserver_info.py
plugins/modules/azure_rm_privatednszone_info.py
plugins/modules/azure_rm_publicipaddress_info.py
plugins/modules/azure_rm_rediscache_info.py
plugins/modules/azure_rm_resource_info.py
plugins/modules/azure_rm_resourcegroup_info.py
plugins/modules/azure_rm_roleassignment_info.py
plugins/modules/azure_rm_roledefinition_info.py
plugins/modules/azure_rm_routetable_info.py
plugins/modules/azure_rm_securitygroup_info.py
plugins/modules/azure_rm_servicebus_info.py
plugins/modules/azure_rm_sqldatabase_info.py
plugins/modules/azure_rm_sqlfirewallrule_info.py
plugins/modules/azure_rm_sqlserver_info.py
plugins/modules/azure_rm_storageaccount_info.py
plugins/modules/azure_rm_subnet_info.py
plugins/modules/azure_rm_trafficmanagerendpoint_info.py
plugins/modules/azure_rm_trafficmanagerprofile_info.py
plugins/modules/azure_rm_virtualmachine_info.py
plugins/modules/azure_rm_virtualmachineextension.py
plugins/modules/azure_rm_virtualmachineextension_info.py
plugins/modules/azure_rm_virtualmachineimage_info.py
plugins/modules/azure_rm_virtualmachinescaleset.py
plugins/modules/azure_rm_virtualmachinescaleset_info.py
plugins/modules/azure_rm_virtualmachinescalesetextension_info.py
plugins/modules/azure_rm_virtualmachinescalesetinstance_info.py
plugins/modules/azure_rm_virtualnetwork_info.py
plugins/modules/azure_rm_virtualnetworkpeering_info.py
plugins/modules/azure_rm_webapp_info.py

ADDITIONAL INFORMATION
[ERROR]: Task failed: Module failed: DeprecationSummary.version must be <class 'str'> or <class 'NoneType'> instead of <class 'tuple'>
Origin: /home/admin/.ansible/collections/ansible_collections/azure/azcollection/tests/output/.tmp/integration/azure_rm_containerregistry-gbzc9__b-ÅÑŚÌβŁÈ/tests/integration/targets/azure_rm_containerregistry/tasks/main.yml:82:3

80       - output.credentials['password2'] is not defined
81
82 - name: Gather facts for single Container Registry
     ^ column 3

fatal: [testhost]: FAILED! => {"changed": false, "msg": "Task failed: Module failed: DeprecationSummary.version must be <class 'str'> or <class 'NoneType'> instead of <class 'tuple'>"}

@Fred-sun
Copy link
Collaborator

Fred-sun commented May 30, 2025

@p3ck It is not recommended to make such a direct change because of compatibility issues. If we make such a change, we will fail to test versions like ansible 2.18, 2.17 ***, etc. Thank you!

ansible-deprecated-no-collection-name: No collection name found in call to Display.deprecated or AnsibleModule.deprecate
ansible-deprecated-version: Deprecated version ('2.9') found in call to Display.deprecated or AnsibleModule.deprecate
E

@Fred-sun Fred-sun added question Further information is requested medium_priority Medium priority work in In trying to solve, or in working with contributors labels May 30, 2025
@p3ck
Copy link
Collaborator Author

p3ck commented May 30, 2025

@p3ck It is not recommended to make such a direct change because of compatibility issues. If we make such a change, we will fail to test versions like ansible 2.18, 2.17 ***, etc. Thank you!

ansible-deprecated-no-collection-name: No collection name found in call to Display.deprecated or AnsibleModule.deprecate
ansible-deprecated-version: Deprecated version ('2.9') found in call to Display.deprecated or AnsibleModule.deprecate
E

This will fail when ansible-2.19 is released.

How about we remove these deprecation warnings entirely? ansible-2.9 has been EOL for quite a while now. I can update the PR.

@Fred-sun
Copy link
Collaborator

Fred-sun commented Jun 3, 2025

@p3ck I'm also considering deleting these warnings because they have been enabled for a long time!

@Fred-sun
Copy link
Collaborator

Fred-sun commented Jun 3, 2025

@p3ck Welcome to update your PR and remove these warnings. Thank you!

Ansible-2.9 has been End of Life since May 23, 2022.
@p3ck p3ck force-pushed the ansible_2.9_deprecate_version branch from 7f4312a to 19ebdd6 Compare June 3, 2025 17:26
@p3ck p3ck changed the title self.module.deprecate version arg only takes a string now Remove deprectaed code since ansible-2.9 has been EOL Jun 3, 2025
@p3ck p3ck requested a review from Fred-sun June 3, 2025 17:28
@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Jun 4, 2025
@Fred-sun Fred-sun requested a review from xuzhang3 June 4, 2025 02:15
@Fred-sun Fred-sun removed the question Further information is requested label Jun 4, 2025
@xuzhang3 xuzhang3 merged commit d7020d8 into ansible-collections:dev Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

medium_priority Medium priority ready_for_review The PR has been modified and can be reviewed and merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants