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

urllib3 / six install broken in ansible-ee-tests-stable-2.12 / ansible-ee-tests-stable-devel environments #1497

Open
tremble opened this issue Apr 20, 2022 · 2 comments

Comments

@tremble
Copy link
Contributor

tremble commented Apr 20, 2022

Tests using boto3/botocore are failing due to a broken urllib/six install. This is likely caused by ansible.netcommon installing python38-six, which then gets reinstalled via pip

See also:
urllib3/urllib3#1518

2022-04-20 09:33:54.360985 | controller | ==================================== ERRORS ====================================
2022-04-20 09:33:54.360989 | controller | ________________________ ERROR collecting test session _________________________
2022-04-20 09:33:54.360993 | controller | ImportError while importing test module '/usr/share/ansible/collections/ansible_collections/amazon/aws/tests/unit/plugins/modules/test_ec2_vpc_dhcp_option.py'.
2022-04-20 09:33:54.360996 | controller | Hint: make sure your test modules/packages have valid Python names.
2022-04-20 09:33:54.361000 | controller | Traceback:
2022-04-20 09:33:54.361003 | controller | /usr/lib64/python3.8/importlib/__init__.py:127: in import_module
2022-04-20 09:33:54.361006 | controller |     return _bootstrap._gcd_import(name[level:], package, level)
2022-04-20 09:33:54.361009 | controller | /tmp/ansible-test-dlc9v4xe/ansible/utils/collection_loader/_collection_finder.py:402: in load_module
2022-04-20 09:33:54.361013 | controller |     exec(code_obj, module.__dict__)
2022-04-20 09:33:54.361016 | controller | tests/unit/plugins/modules/test_ec2_vpc_dhcp_option.py:10: in <module>
2022-04-20 09:33:54.361019 | controller |     from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify  # pylint: disable=unused-import
2022-04-20 09:33:54.361023 | controller | E   ImportError: cannot import name 'placeboify' from 'ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures' (/usr/share/ansible/collections/ansible_collections/amazon/aws/tests/unit/utils/amazon_placebo_fixtures.py)
2022-04-20 09:33:54.361026 | controller | - generated xml file: /usr/share/ansible/collections/ansible_collections/amazon/aws/tests/output/junit/python3.8-modules-units.xml -
2022-04-20 09:33:54.361029 | controller | =========================== short test summary info ============================
2022-04-20 09:33:54.361032 | controller | SKIPPED [1] tests/unit/plugins/modules/test_aws_s3.py:16: could not import 'boto3': No module named 'urllib3.packages.six'
2022-04-20 09:33:54.361036 | controller | SKIPPED [1] tests/unit/utils/amazon_placebo_fixtures.py:10: could not import 'boto3': No module named 'urllib3.packages.six'
2022-04-20 09:33:54.361039 | controller | ERROR ../../../../../../local/lib/python3.8/site-packages/ansible_test/_data
2022-04-20 09:33:54.361042 | controller | ==================== 3 passed, 2 skipped, 1 error in 0.60s =====================
2022-04-20 09:33:54.408964 | controller | ERROR: Command "pytest --forked -r a -n auto --color no -p no:cacheprovider -c /usr/local/lib/python3.8/site-packages/ansible_test/_data/pytest.ini --junit-xml /usr/share/ansible/collections/ansible_collections/amazon/aws/tests/output/junit/python3.8-modules-units.xml --strict-markers tests/unit/plugins/modules/test_aws_s3.py tests/unit/plugins/modules/test_cloudformation.py tests/unit/plugins/modules/test_ec2_group.py tests/unit/plugins/modules/test_ec2_vpc_dhcp_option.py" returned exit status 1.

Example failure:
https://ansible.softwarefactory-project.io/zuul/build/87e61df77f2d42688bb020c478d26f58/logs ( https://24c75d1ca6f3a9bcbe40-22bfaf5d5c3577156f2cc8ae23baf11e.ssl.cf5.rackcdn.com/775/f794724027764404876902afbe7de98506334590/check/ansible-ee-tests-stable-2.12/87e61df/job-output.txt )

@jillr
Copy link
Collaborator

jillr commented Apr 20, 2022

the python38-six inclusion is going to change to python39-six very soon, we also need to do a review of the amazon.aws bindep.txt inclusions so that might be a better long term solution? I'll try to put up a test PR later today to explore that idea.

@tremble
Copy link
Contributor Author

tremble commented Apr 20, 2022

From what I could follow, the inclusion of six==1.16.0 in test/sanity/code-smell/docs-build.requirements.txtis causing the system install of python38-six to get partially removed (see the linked urllib3 issue), breaking everything.

The next thing I was going to try was actually updating ansible.netcommon to replace the bindep with a requirements.txt dep.

softwarefactory-project-zuul bot pushed a commit that referenced this issue Apr 20, 2022
…-stable-2.12 non voting for amazon.aws (#1498)

Make ansible-ee-tests-latest globally non-voting and ansible-ee-tests-stable-2.12 non voting for amazon.aws

ansible-latest (ie devel) is expected to break from time to time, with things like new sanity tests landing.  Such changes will likely result in new ignore file entries being needed until cleanup can be applied.  While we should be reacting reasonably quickly to this, we shouldn't instantly break CI for multiple collections.
ansible-ee-tests-stable-2.12 and ansible-ee-tests-latest are currently broken for amazon.aws due to #1497 this is a problem with the containers, the unit and sanity tests are running fine in the 'standard' environments.
goneri pushed a commit to goneri/ansible-zuul-jobs that referenced this issue Apr 25, 2022
…-stable-2.12 non voting for amazon.aws (ansible#1498)

Make ansible-ee-tests-latest globally non-voting and ansible-ee-tests-stable-2.12 non voting for amazon.aws

ansible-latest (ie devel) is expected to break from time to time, with things like new sanity tests landing.  Such changes will likely result in new ignore file entries being needed until cleanup can be applied.  While we should be reacting reasonably quickly to this, we shouldn't instantly break CI for multiple collections.
ansible-ee-tests-stable-2.12 and ansible-ee-tests-latest are currently broken for amazon.aws due to ansible#1497 this is a problem with the containers, the unit and sanity tests are running fine in the 'standard' environments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants