-
Notifications
You must be signed in to change notification settings - Fork 57
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
Comments
Sweet, thanks for filing this @dmsimard 👍 |
@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 |
@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? |
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
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:
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 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! |
❯ 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. |
That doesn't seem right, is there a mistake ? |
Hehe, it's Sunday -- I shouldn't be on the computer! Trying again 😄 |
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
COMPONENT NAME
n/a
ANSIBLE VERSION
COLLECTION VERSION
STEPS TO REPRODUCE
ansible-test sanity --docker
EXPECTED RESULTS
Tests are either passing or ignored.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: