ansible-collections / community.kubernetes

Kubernetes Collection for Ansible
https://galaxy.ansible.com/community/kubernetes
GNU General Public License v3.0
265 stars 106 forks source link

Sanity test 'compile' failing when importing into Automation Hub #260

Closed geerlingguy closed 3 years ago

geerlingguy commented 3 years ago
SUMMARY

I just tried uploading the kubernetes.core downstream tarball to Automation Hub, and it seems like it came back with two errors:

Running sanity test 'compile' with Python 2.6 
ERROR: Found 1 compile issue(s) on python 2.6 which need to be resolved: 
ERROR: plugins/modules/k8s.py:280:38: SyntaxError: def __init__(self, *args, k8s_kind=None, **kwargs): 
See documentation for help: https://docs.ansible.com/ansible/2.9/dev_guide/testing/sanity/compile.html 
Running sanity test 'compile' with Python 2.7 
ERROR: Found 1 compile issue(s) on python 2.7 which need to be resolved: 
ERROR: plugins/modules/k8s.py:280:38: SyntaxError: def __init__(self, *args, k8s_kind=None, **kwargs): 
See documentation for help: https://docs.ansible.com/ansible/2.9/dev_guide/testing/sanity/compile.html 
ISSUE TYPE
COMPONENT NAME

Automation Hub upload

geerlingguy commented 3 years ago

Can reproduce it locally:

$ ansible-test sanity --test compile
WARNING: Skipping sanity test 'compile' on Python 2.6 due to missing interpreter.
Running sanity test 'compile' with Python 2.7
ERROR: Found 1 compile issue(s) on python 2.7 which need to be resolved:
ERROR: plugins/modules/k8s.py:280:38: SyntaxError: def __init__(self, *args, k8s_kind=None, **kwargs):
See documentation for help: https://docs.ansible.com/ansible/2.10/dev_guide/testing/sanity/compile.html
WARNING: Skipping sanity test 'compile' on Python 3.5 due to missing interpreter.
WARNING: Skipping sanity test 'compile' on Python 3.6 due to missing interpreter.
WARNING: Skipping sanity test 'compile' on Python 3.7 due to missing interpreter.
Running sanity test 'compile' with Python 3.8
WARNING: Skipping sanity test 'compile' on Python 3.9 due to missing interpreter.
ERROR: The 1 sanity test(s) listed below (out of 7) failed. See error output above for details.
compile --python 2.7

(Why is our CI not failing?)

pabelanger commented 3 years ago

you look to be running ansible-test from devel, automation hub is pinned to use ansible 2.9 ansible-test. This could be why you do not see it.

You should be able to export sanity test logs in AH, and share here to confirm

geerlingguy commented 3 years ago

It's interesting—I reproduced the issue locally with Python 3.8 and Ansible 2.10.1 :-/