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

Sanity tests failing in community.digitalocean #247

Closed
dmsimard opened this issue May 6, 2022 · 8 comments
Closed

Sanity tests failing in community.digitalocean #247

dmsimard opened this issue May 6, 2022 · 8 comments
Assignees
Labels
ci lint tests Related to tests and testing

Comments

@dmsimard
Copy link
Contributor

dmsimard commented May 6, 2022

SUMMARY

We are running sanity tests across every collection included in the Ansible community package (as part of this issue) and found that ansible-test sanity --docker against community.digitalocean 1.18.0 fails with ansible-core 2.13.0rc1 in ansible 6.0.0a2.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

n/a

ANSIBLE VERSION
ansible [core 2.13.0rc1]
COLLECTION VERSION
1.18.0
STEPS TO REPRODUCE
ansible-test sanity --docker
EXPECTED RESULTS

Tests are either passing or ignored.

ACTUAL RESULTS
ERROR: Found 2 compile issue(s) on python 2.7 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: Found 2 compile issue(s) on python 3.5 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: Found 2 import issue(s) on python 2.7 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: traceback: SyntaxError: invalid syntax
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: traceback: SyntaxError: invalid syntax
ERROR: Found 2 import issue(s) on python 3.5 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: traceback: SyntaxError: invalid syntax
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: traceback: SyntaxError: invalid syntax
ERROR: Found 1 import issue(s) on python 3.10 which need to be resolved:
ERROR: plugins/modules/digital_ocean.py:192:0: traceback: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
ERROR: Found 39 validate-modules issue(s) which need to be resolved:
ERROR: plugins/modules/digital_ocean_account_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_account_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_account_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_account_info'
ERROR: plugins/modules/digital_ocean_certificate_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_certificate_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_certificate_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_certificate_info'
ERROR: plugins/modules/digital_ocean_domain_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_domain_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_domain_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_domain_info'
ERROR: plugins/modules/digital_ocean_firewall_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_firewall_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_firewall_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_firewall_info'
ERROR: plugins/modules/digital_ocean_floating_ip_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_floating_ip_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_floating_ip_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_floating_ip_info'
ERROR: plugins/modules/digital_ocean_image_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_image_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_image_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_image_info'
ERROR: plugins/modules/digital_ocean_load_balancer_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_load_balancer_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_load_balancer_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_load_balancer_info'
ERROR: plugins/modules/digital_ocean_region_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_region_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_region_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_region_info'
ERROR: plugins/modules/digital_ocean_size_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_size_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_size_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_size_info'
ERROR: plugins/modules/digital_ocean_snapshot_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_snapshot_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_snapshot_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_snapshot_info'
ERROR: plugins/modules/digital_ocean_sshkey_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_sshkey_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_sshkey_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_sshkey_info'
ERROR: plugins/modules/digital_ocean_tag_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_tag_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_tag_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_tag_info'
ERROR: plugins/modules/digital_ocean_volume_facts.py:0:0: deprecation-mismatch: "meta/runtime.yml" and DOCUMENTATION.deprecation do not agree.
ERROR: plugins/modules/digital_ocean_volume_facts.py:0:0: invalid-documentation: DOCUMENTATION.deprecated: required key not provided @ data['deprecated']. Got None
ERROR: plugins/modules/digital_ocean_volume_facts.py:0:0: invalid-documentation: DOCUMENTATION.module: not a valid value for dictionary value @ data['module']. Got 'digital_ocean_volume_info'
ERROR: The 6 sanity test(s) listed below (out of 43) failed. See error output above for details.
compile --python 2.7
compile --python 3.5
import --python 2.7
import --python 3.5
import --python 3.10
validate-modules
ERROR: Command "podman exec ansible-test-controller-FMF8HiR8 /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/community/digitalocean LC_ALL=en_US.UTF-8 /usr/bin/python3.10 /root/ansible/bin/ansible-test sanity --containers '{}' --skip-test pylint --metadata tests/output/.tmp/metadata-0see5ae5.json --truncate 0 --color no --host-path tests/output/.tmp/host-b8zvlnj6" returned exit status 1.
@mamercad
Copy link
Collaborator

mamercad commented May 6, 2022

Sweet, thanks for filing this @dmsimard 👍

@mamercad mamercad added ci lint tests Related to tests and testing labels May 6, 2022
@mamercad
Copy link
Collaborator

mamercad commented May 7, 2022

@dmsimard I'm not able to reproduce this locally, got any hints?

❯ ansible-test sanity --docker
Starting new "pypi-test-container-gT5ZGZ5A" container.
Adding "pypi-test-container-gT5ZGZ5A" to container database.
Starting new "ansible-test-controller-gT5ZGZ5A" container.
Adding "ansible-test-controller-gT5ZGZ5A" to container database.
Running sanity test "action-plugin-docs"
Running sanity test "ansible-doc"
Running sanity test "changelog"
Running sanity test "compile" on Python 2.6
ERROR: Found 2 compile issue(s) on python 2.6 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
See documentation for help: https://docs.ansible.com/ansible/2.12/dev_guide/testing/sanity/compile.html
Running sanity test "compile" on Python 2.7
ERROR: Found 2 compile issue(s) on python 2.7 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
See documentation for help: https://docs.ansible.com/ansible/2.12/dev_guide/testing/sanity/compile.html
Running sanity test "compile" on Python 3.5
ERROR: Found 2 compile issue(s) on python 3.5 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
See documentation for help: https://docs.ansible.com/ansible/2.12/dev_guide/testing/sanity/compile.html
Running sanity test "compile" on Python 3.6
Running sanity test "compile" on Python 3.7
Running sanity test "compile" on Python 3.8
Running sanity test "compile" on Python 3.9
Running sanity test "compile" on Python 3.10
Running sanity test "empty-init"
Running sanity test "future-import-boilerplate"
Running sanity test "ignores"
Running sanity test "import" on Python 2.6
ERROR: Found 2 import issue(s) on python 2.6 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: traceback: SyntaxError: invalid syntax
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: traceback: SyntaxError: invalid syntax
See documentation for help: https://docs.ansible.com/ansible/2.12/dev_guide/testing/sanity/import.html
Running sanity test "import" on Python 2.7
ERROR: Found 2 import issue(s) on python 2.7 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: traceback: SyntaxError: invalid syntax
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: traceback: SyntaxError: invalid syntax
See documentation for help: https://docs.ansible.com/ansible/2.12/dev_guide/testing/sanity/import.html
Running sanity test "import" on Python 3.5
ERROR: Found 2 import issue(s) on python 3.5 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: traceback: SyntaxError: invalid syntax
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: traceback: SyntaxError: invalid syntax
See documentation for help: https://docs.ansible.com/ansible/2.12/dev_guide/testing/sanity/import.html
Running sanity test "import" on Python 3.6
Running sanity test "import" on Python 3.7
Running sanity test "import" on Python 3.8
Running sanity test "import" on Python 3.9
Running sanity test "import" on Python 3.10
Running sanity test "line-endings"
Running sanity test "metaclass-boilerplate"
Running sanity test "no-assert"
Running sanity test "no-basestring"
Running sanity test "no-dict-iteritems"
Running sanity test "no-dict-iterkeys"
Running sanity test "no-dict-itervalues"
Running sanity test "no-get-exception"
Running sanity test "no-illegal-filenames"
Running sanity test "no-main-display"
Running sanity test "no-smart-quotes"
Running sanity test "no-unicode-literals"
Running sanity test "pep8"
Running sanity test "pslint"
Running sanity test "pylint"
Running sanity test "replace-urlopen"
Running sanity test "runtime-metadata"
Running sanity test "shebang"
Running sanity test "shellcheck"
Running sanity test "symlinks"
Running sanity test "use-argspec-type-path"
Running sanity test "use-compat-six"
Running sanity test "validate-modules"
Running sanity test "yamllint"
ERROR: The 6 sanity test(s) listed below (out of 46) failed. See error output above for details.
compile --python 2.6
compile --python 2.7
compile --python 3.5
import --python 2.6
import --python 2.7
import --python 3.5
ERROR: Command "docker exec -it ansible-test-controller-gT5ZGZ5A /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/community/digitalocean LC_ALL=en_US.UTF-8 /usr/bin/python3.9 /root/ansible/bin/ansible-test sanity --containers '{"control": {"__pypi_proxy__": {"pypi-test-container-gT5ZGZ5A": {"host_ip": "172.17.0.2", "names": ["pypi-test-container-gT5ZGZ5A"], "ports": [3141]}}}, "managed": {"__pypi_proxy__": {"pypi-test-container-gT5ZGZ5A": {"host_ip": "172.17.0.2", "names": ["pypi-test-container-gT5ZGZ5A"], "ports": [3141]}}}}' --metadata tests/output/.tmp/metadata-qkj51czk.json --truncate 102 --color yes --host-path tests/output/.tmp/host-ppafliy4" returned exit status 1.

I don't see all of the deprecation-mismatch and invalid-documentation errors.

@mamercad
Copy link
Collaborator

mamercad commented May 7, 2022

@dmsimard After fixing the "compile" and "import" problems, I see this:

❯ ansible-test sanity --docker
Starting new "pypi-test-container-tep3hr1K" container.
Adding "pypi-test-container-tep3hr1K" to container database.
Starting new "ansible-test-controller-tep3hr1K" container.
Adding "ansible-test-controller-tep3hr1K" to container database.
Running sanity test "action-plugin-docs"
Running sanity test "ansible-doc"
Running sanity test "changelog"
Running sanity test "compile" on Python 2.6
Running sanity test "compile" on Python 2.7
Running sanity test "compile" on Python 3.5
Running sanity test "compile" on Python 3.6
Running sanity test "compile" on Python 3.7
Running sanity test "compile" on Python 3.8
Running sanity test "compile" on Python 3.9
Running sanity test "compile" on Python 3.10
Running sanity test "empty-init"
Running sanity test "future-import-boilerplate"
Running sanity test "ignores"
Running sanity test "import" on Python 2.6
Running sanity test "import" on Python 2.7
Running sanity test "import" on Python 3.5
Running sanity test "import" on Python 3.6
Running sanity test "import" on Python 3.7
Running sanity test "import" on Python 3.8
Running sanity test "import" on Python 3.9
Running sanity test "import" on Python 3.10
Running sanity test "line-endings"
Running sanity test "metaclass-boilerplate"
Running sanity test "no-assert"
Running sanity test "no-basestring"
Running sanity test "no-dict-iteritems"
Running sanity test "no-dict-iterkeys"
Running sanity test "no-dict-itervalues"
Running sanity test "no-get-exception"
Running sanity test "no-illegal-filenames"
Running sanity test "no-main-display"
Running sanity test "no-smart-quotes"
Running sanity test "no-unicode-literals"
Running sanity test "pep8"
Running sanity test "pslint"
Running sanity test "pylint"
Running sanity test "replace-urlopen"
Running sanity test "runtime-metadata"
Running sanity test "shebang"
Running sanity test "shellcheck"
Running sanity test "symlinks"
Running sanity test "use-argspec-type-path"
Running sanity test "use-compat-six"
Running sanity test "validate-modules"
Running sanity test "yamllint"

How can I reproduce what you're seeing?

@dmsimard
Copy link
Contributor Author

Thanks for looking into this @mamercad.

I explain how I ran sanity tests in this other issue -- I first ran them from within the pypi release tarball and then I've recently re-run them from ansible-galaxy collection install where I got different issues this time:

ERROR: Found 2 compile issue(s) on python 2.7 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: Found 2 compile issue(s) on python 3.5 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: Found 2 import issue(s) on python 2.7 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: traceback: SyntaxError: invalid syntax
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: traceback: SyntaxError: invalid syntax
ERROR: Found 2 import issue(s) on python 3.5 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: traceback: SyntaxError: invalid syntax
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: traceback: SyntaxError: invalid syntax
ERROR: Found 1 import issue(s) on python 3.10 which need to be resolved:
ERROR: plugins/modules/digital_ocean.py:192:0: traceback: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
ERROR: The 5 sanity test(s) listed below (out of 43) failed. See error output above for details.
compile --python 2.7
compile --python 3.5
import --python 2.7
import --python 3.5
import --python 3.10
ERROR: Command "podman exec ansible-test-controller-v48vtj3j /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/community/digitalocean LC_ALL=en_US.UTF-8 /usr/bin/python3.10 /root/ansible/bin/ansible-test sanity --containers '{}' --skip-test pylint --metadata tests/output/.tmp/metadata-s4pjjr7v.json --truncate 0 --color no --host-path tests/output/.tmp/host-aoy9xgkp" returned exit status 1.

I run the tests via an ansible playbook (so I can record them with ara 😉) but you should be able to reproduce them with something like:

# with docker or podman installed
python3 -m venv /tmp/ansible
source /tmp/ansible/bin/activate
pip install ansible-core==2.13.0rc1
ANSIBLE_COLLECTIONS_PATH=/tmp/ansible_collections ansible-galaxy collection install community.digitalocean:1.18.0
cd /tmp/ansible_collections/community/digitalocean
ansible-test sanity --docker

If you want to try and reproduce from a git repo, you can run it from anywhere so long as the git repo directory is under ansible_collections/community/digitalocean.

There's no emergency to fix those right away but it'd be great if the fixes (or ignores, as appropriate) are included in a new release of the collection before the feature freeze on 2022-05-24 so it can be shipped with ansible 6.0.0 on 2022-06-21.

@mamercad
Copy link
Collaborator

Thanks for looking into this @mamercad.

I explain how I ran sanity tests in this other issue -- I first ran them from within the pypi release tarball and then I've recently re-run them from ansible-galaxy collection install where I got different issues this time:

ERROR: Found 2 compile issue(s) on python 2.7 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: Found 2 compile issue(s) on python 3.5 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: SyntaxError: endpoint_url=f"https://{region}.digitaloceanspaces.com",
ERROR: Found 2 import issue(s) on python 2.7 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: traceback: SyntaxError: invalid syntax
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: traceback: SyntaxError: invalid syntax
ERROR: Found 2 import issue(s) on python 3.5 which need to be resolved:
ERROR: plugins/modules/digital_ocean_spaces.py:121:67: traceback: SyntaxError: invalid syntax
ERROR: plugins/modules/digital_ocean_spaces_info.py:104:71: traceback: SyntaxError: invalid syntax
ERROR: Found 1 import issue(s) on python 3.10 which need to be resolved:
ERROR: plugins/modules/digital_ocean.py:192:0: traceback: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
ERROR: The 5 sanity test(s) listed below (out of 43) failed. See error output above for details.
compile --python 2.7
compile --python 3.5
import --python 2.7
import --python 3.5
import --python 3.10
ERROR: Command "podman exec ansible-test-controller-v48vtj3j /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/community/digitalocean LC_ALL=en_US.UTF-8 /usr/bin/python3.10 /root/ansible/bin/ansible-test sanity --containers '{}' --skip-test pylint --metadata tests/output/.tmp/metadata-s4pjjr7v.json --truncate 0 --color no --host-path tests/output/.tmp/host-aoy9xgkp" returned exit status 1.

I run the tests via an ansible playbook (so I can record them with ara 😉) but you should be able to reproduce them with something like:

# with docker or podman installed
python3 -m venv /tmp/ansible
source /tmp/ansible/bin/activate
pip install ansible-core==2.13.0rc1
ANSIBLE_COLLECTIONS_PATH=/tmp/ansible_collections ansible-galaxy collection install community.digitalocean:1.18.0
cd /tmp/ansible_collections/community/digitalocean
ansible-test sanity --docker

If you want to try and reproduce from a git repo, you can run it from anywhere so long as the git repo directory is under ansible_collections/community/digitalocean.

There's no emergency to fix those right away but it'd be great if the fixes (or ignores, as appropriate) are included in a new release of the collection before the feature freeze on 2022-05-24 so it can be shipped with ansible 6.0.0 on 2022-06-21.

Thanks so much @dmsimard; confirmed, I can reproduce!

@mamercad
Copy link
Collaborator

❯ pip3 freeze | grep ansi
ansible-core==2.13.0rc1

❯ ansible --version
ansible [core 2.12.1]
  config file = /Users/mark/.ansible.cfg
  configured module search path = ['/Users/mark/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/mark/.pyenv/versions/3.9.9/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/mark/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/mark/.pyenv/versions/3.9.9/bin/ansible
  python version = 3.9.9 (main, Dec  9 2021, 19:41:06) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.3
  libyaml = True

❯ ansible-test sanity --docker
Starting new "pypi-test-container-ihVVF6gd" container.
Adding "pypi-test-container-ihVVF6gd" to container database.
Starting new "ansible-test-controller-ihVVF6gd" container.
Adding "ansible-test-controller-ihVVF6gd" to container database.
Running sanity test "action-plugin-docs"
Running sanity test "ansible-doc"
Running sanity test "changelog"
Running sanity test "compile" on Python 2.6
Running sanity test "compile" on Python 2.7
Running sanity test "compile" on Python 3.5
Running sanity test "compile" on Python 3.6
Running sanity test "compile" on Python 3.7
Running sanity test "compile" on Python 3.8
Running sanity test "compile" on Python 3.9
Running sanity test "compile" on Python 3.10
Running sanity test "empty-init"
Running sanity test "future-import-boilerplate"
Running sanity test "ignores"
Running sanity test "import" on Python 2.6
Running sanity test "import" on Python 2.7
Running sanity test "import" on Python 3.5
Running sanity test "import" on Python 3.6
Running sanity test "import" on Python 3.7
Running sanity test "import" on Python 3.8
Running sanity test "import" on Python 3.9
Running sanity test "import" on Python 3.10
Running sanity test "line-endings"
Running sanity test "metaclass-boilerplate"
Running sanity test "no-assert"
Running sanity test "no-basestring"
Running sanity test "no-dict-iteritems"
Running sanity test "no-dict-iterkeys"
Running sanity test "no-dict-itervalues"
Running sanity test "no-get-exception"
Running sanity test "no-illegal-filenames"
Running sanity test "no-main-display"
Running sanity test "no-smart-quotes"
Running sanity test "no-unicode-literals"
Running sanity test "pep8"
Running sanity test "pslint"
Running sanity test "pylint"
Running sanity test "replace-urlopen"
Running sanity test "runtime-metadata"
Running sanity test "shebang"
Running sanity test "shellcheck"
Running sanity test "symlinks"
Running sanity test "use-argspec-type-path"
Running sanity test "use-compat-six"
Running sanity test "validate-modules"
Running sanity test "yamllint"

Running the ignores from #249.

@dmsimard
Copy link
Contributor Author

❯ pip3 freeze | grep ansi
ansible-core==2.13.0rc1

❯ ansible --version
ansible [core 2.12.1]

That doesn't seem right, is there a mistake ?

@mamercad
Copy link
Collaborator

❯ pip3 freeze | grep ansi
ansible-core==2.13.0rc1
❯ ansible --version
ansible [core 2.12.1]

That doesn't seem right, is there a mistake ?

Hehe, it's Sunday -- I shouldn't be on the computer! Trying again 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci lint tests Related to tests and testing
Projects
None yet
Development

No branches or pull requests

2 participants