wtinetworkgear / wti-collection

WTI Ansible Collection
2 stars 6 forks source link

Community package requirements: sanity tests and CI #15

Closed gotmax23 closed 1 month ago

gotmax23 commented 9 months ago

(Note: This issue was filed in a semi-automated fashion. Let me know if you see errors in this issue.)

As per the Ansible community package inclusion requirements, collections must pass ansible-test sanity tests. Version 1.0.5 of wti.remote, corresponding to the v1.0.5 tag in this repo, fails one or more of the required sanity tests.

Please see the errors below and address them. If these issues aren't addressed within a reasonable time period, the collection may be subject to removal from Ansible.

Thank you for your efforts and for being part of the Ansible package! We appreciate it.


Sanity tests

The following tests were run using ansible-test version 2.16.1:

Note that this is only a subset of the required sanity tests. Please make sure you run them in all in your CI.

Results

The test ansible-test sanity --test ansible-doc [explain] failed with the error:

Output on stderr from ansible-doc is considered an error.

Command "ansible-doc -t lookup wti.remote.cpm_alarm_info wti.remote.cpm_config_backup wti.remote.cpm_config_restore wti.remote.cpm_current_info wti.remote.cpm_firmware_info wti.remote.cpm_firmware_update wti.remote.cpm_hostname_config wti.remote.cpm_hostname_info wti.remote.cpm_interface_config wti.remote.cpm_interface_info wti.remote.cpm_iptables_config wti.remote.cpm_iptables_info wti.remote.cpm_metering wti.remote.cpm_plugconfig wti.remote.cpm_plugcontrol wti.remote.cpm_power_info wti.remote.cpm_serial_port_action_info wti.remote.cpm_serial_port_action_set wti.remote.cpm_serial_port_config wti.remote.cpm_serial_port_info wti.remote.cpm_snmp_config wti.remote.cpm_snmp_info wti.remote.cpm_status wti.remote.cpm_status_info wti.remote.cpm_syslog_client_config wti.remote.cpm_syslog_client_info wti.remote.cpm_syslog_server_config wti.remote.cpm_syslog_server_info wti.remote.cpm_temp_info wti.remote.cpm_time_config wti.remote.cpm_time_info wti.remote.cpm_user" returned exit status 0.
>>> Standard Error
[WARNING]: While constructing a mapping from
/root/ansible_collections/wti/remote/plugins/lookup/cpm_snmp_config.py, line
58, column 9, found a duplicate dict key (type). Using last defined value only.

The test ansible-test sanity --test validate-modules [explain] failed with 85 errors:

plugins/lookup/cpm_alarm_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_alarm_info'
plugins/lookup/cpm_alarm_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_alarm_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_config_backup.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_config_backup'
plugins/lookup/cpm_config_backup.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_config_backup.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_config_restore.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_config_restore'
plugins/lookup/cpm_config_restore.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_config_restore.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_current_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_current_info'
plugins/lookup/cpm_current_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_current_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_firmware_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_firmware_info'
plugins/lookup/cpm_firmware_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_firmware_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_firmware_update.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_firmware_update'
plugins/lookup/cpm_firmware_update.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_firmware_update.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_hostname_config.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_hostname_config'
plugins/lookup/cpm_hostname_config.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_hostname_config.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_hostname_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_hostname_info'
plugins/lookup/cpm_hostname_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_hostname_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_interface_config.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_interface_config'
plugins/lookup/cpm_interface_config.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_interface_config.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_interface_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_interface_info'
plugins/lookup/cpm_interface_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_interface_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_iptables_config.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_iptables_config'
plugins/lookup/cpm_iptables_config.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_iptables_config.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_iptables_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_iptables_info'
plugins/lookup/cpm_iptables_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_iptables_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_plugconfig.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_plugconfig'
plugins/lookup/cpm_plugconfig.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_plugcontrol.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_plugcontrol'
plugins/lookup/cpm_plugcontrol.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_power_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_power_info'
plugins/lookup/cpm_power_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_power_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_serial_port_action_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_serial_port_action_info'
plugins/lookup/cpm_serial_port_action_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_serial_port_action_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_serial_port_action_set.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_serial_port_action_set'
plugins/lookup/cpm_serial_port_action_set.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_serial_port_config.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_serial_port_config'
plugins/lookup/cpm_serial_port_config.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_serial_port_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_serial_port_info'
plugins/lookup/cpm_serial_port_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_serial_port_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_snmp_config.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_snmp_config'
plugins/lookup/cpm_snmp_config.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_snmp_config.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_snmp_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_snmp_info'
plugins/lookup/cpm_snmp_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_snmp_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_status_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_status_info'
plugins/lookup/cpm_status_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_status_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_syslog_client_config.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_syslog_client_config'
plugins/lookup/cpm_syslog_client_config.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_syslog_client_config.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_syslog_client_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_syslog_client_info'
plugins/lookup/cpm_syslog_client_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_syslog_client_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_syslog_server_config.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_syslog_server_config'
plugins/lookup/cpm_syslog_server_config.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_syslog_server_config.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_syslog_server_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_syslog_server_info'
plugins/lookup/cpm_syslog_server_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_syslog_server_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_temp_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_temp_info'
plugins/lookup/cpm_temp_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_temp_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_time_config.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_time_config'
plugins/lookup/cpm_time_config.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_time_config.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_time_info.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_time_info'
plugins/lookup/cpm_time_info.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None
plugins/lookup/cpm_time_info.py:0:0: return-syntax-error: RETURN.data.type: not a valid value for dictionary value @ data['data']['type']. Got 'complex'
plugins/lookup/cpm_user.py:0:0: invalid-documentation: DOCUMENTATION.module: extra keys not allowed @ data['module']. Got 'cpm_user'
plugins/lookup/cpm_user.py:0:0: invalid-documentation: DOCUMENTATION.name: required key not provided @ data['name']. Got None

The test ansible-test sanity --test yamllint [explain] failed with 4 errors:

meta/runtime.yml:35:1: empty-lines: too many blank lines (1 > 0)
playbooks/cpm_syslog_client/syslog_client_info.yml:30:1: empty-lines: too many blank lines (1 > 0)
playbooks/cpm_syslog_server/syslog_server_config.yml:40:1: empty-lines: too many blank lines (1 > 0)
playbooks/cpm_syslog_server/syslog_server_info.yml:30:1: empty-lines: too many blank lines (1 > 0)
gotmax23 commented 2 months ago

@wtinetworkgear, please take a look at the outstanding sanity test errors. https://github.com/ansible-community/package-test-results/blob/main/rendered/10.3.0/wti.remote.md contains the results for the latest version of ansible. Note that, if these issues aren't acknowledged within a reasonable time period, the collection may be subject to removal from Ansible.

gotmax23 commented 1 month ago

@wtinetworkgear, any updates? I have started processing removal from Ansible for the other collections that failed automated testing.

wtinetworkgear commented 1 month ago

Hello @gotmax23 , We uploaded a new version, that does not take care of the issue ?

gotmax23 commented 1 month ago

Nope, I'm still getting failures, even with the latest git version:

(venv) [gotmax@ftop4] ~/.../wti/remote >>> git show -q
commit b3519cca503e2fd5242462cfba05c7da2278dcd5 (HEAD -> master, origin/master, origin/HEAD)
Author: kenp <kenp@wti.com>
Date:   Fri Aug 30 16:23:17 2024 -0400

    updated CHANGELOG
(venv) [gotmax@ftop4] ~/.../wti/remote >>> ansible-test --version
ansible-test version 2.17.3
(venv) [gotmax@ftop4] ~/.../wti/remote >>> python -V                              
Python 3.12.5
(venv) [gotmax@ftop4] ~/.../wti/remote >>> ansible-test sanity --docker
[failures here]
gotmax23 commented 1 month ago

Also, the collection's repository does not have a CI configuration. Please note the CI guidelines in the collection requirements.

wtinetworkgear commented 1 month ago

Hi @gotmax23 , We appreciate your help on this, we know your group is busy there. The errors are corrected and the CI configuration was added.

gotmax23 commented 1 month ago

Thank you for the quick response! It looks like ansible-test sanity is now passing locally. There was a small issue in the CI configuration, so I filed https://github.com/wtinetworkgear/wti-collection/pull/16. Other than that, this should be good to go. Please create a new release with the changes so they will be picked up in the next round of Ansible package–wide testing.

Thanks again for your efforts and for being part of the Ansible Community package.