Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Integration Tests fail on Ubuntu 24.10 & 25.04 #37

@gdrosos

Description

@gdrosos
SUMMARY

We ran a cross-OS testing campaign for ibm.ds8000, and specifically when testing a given module e.g. ds8000_volume_info using the command: ansible-test integration ds8000_volume_info --allow-destructive --requirements --allow-root --continue-on-error, the tests run as expected on Ubuntu 20.04, 22.04, 24.04, Fedora 34, 38, Alpine, Arch Linux, and Debian (latest versions). However, on Ubuntu 24.10 and 25.04, the tests fail to execute with an import error. By the way, this is the case for the integration tests of all modules of the repo.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ibm_ds8000

ANSIBLE VERSION

I used the latest version of ansible-test

OS / ENVIRONMENT

Same error can be reproduced on Ubuntu 24.10 and Ubuntu 25.04

STEPS TO REPRODUCE

Having installed ansible-test, on Ubuntu 24.10 or Ubuntu 25.04 run the following command from the directory of the repo:

ansible-test integration ds8000_volume_info --allow-destructive --requirements --allow-root --continue-on-error

EXPECTED RESULTS

In other operating systems or versions (e.g. Ubuntu versions 20.04, 22.04 24.04, Fedora 38, Fedora 34, Alpine , Arch Linux or Debian) tests are running as expected, and we have the expected result of:

Installing requirements for Python 3.13 (controller)
Collecting jinja2>=3.0.0 (from -r requirements/ansible.txt (line 6))
  Downloading jinja2-3.1.6-py3-none-any.whl.metadata (2.9 kB)
Collecting PyYAML>=5.1 (from -r requirements/ansible.txt (line 7))
  Downloading PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Collecting cryptography (from -r requirements/ansible.txt (line 8))
  Downloading cryptography-44.0.2-cp39-abi3-manylinux_2_34_x86_64.whl.metadata (5.7 kB)
Collecting packaging (from -r requirements/ansible.txt (line 9))
  Downloading packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
Collecting resolvelib<2.0.0,>=0.5.3 (from -r requirements/ansible.txt (line 15))
  Downloading resolvelib-1.1.0-py2.py3-none-any.whl.metadata (3.7 kB)
Collecting MarkupSafe>=2.0 (from jinja2>=3.0.0->-r requirements/ansible.txt (line 6))
  Downloading MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.0 kB)
Collecting cffi>=1.12 (from cryptography->-r requirements/ansible.txt (line 8))
  Downloading cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
Collecting pycparser (from cffi>=1.12->cryptography->-r requirements/ansible.txt (line 8))
  Downloading pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
Downloading jinja2-3.1.6-py3-none-any.whl (134 kB)
Downloading PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (759 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 759.5/759.5 kB 28.1 MB/s eta 0:00:00
Downloading cryptography-44.0.2-cp39-abi3-manylinux_2_34_x86_64.whl (4.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 75.3 MB/s eta 0:00:00
Downloading packaging-24.2-py3-none-any.whl (65 kB)
Downloading resolvelib-1.1.0-py2.py3-none-any.whl (18 kB)
Downloading cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (479 kB)
Downloading MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23 kB)
Downloading pycparser-2.22-py3-none-any.whl (117 kB)
Installing collected packages: resolvelib, PyYAML, pycparser, packaging, MarkupSafe, jinja2, cffi, cryptography
Successfully installed MarkupSafe-3.0.2 PyYAML-6.0.2 cffi-1.17.1 cryptography-44.0.2 jinja2-3.1.6 packaging-24.2 pycparser-2.22 resolvelib-1.1.0
Collecting pyds8k>=1.5.0 (from -r tests/integration/requirements.txt (line 1))
  Downloading pyds8k-1.5.0-py3-none-any.whl.metadata (1.0 kB)
Collecting requests (from pyds8k>=1.5.0->-r tests/integration/requirements.txt (line 1))
  Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting httpretty (from pyds8k>=1.5.0->-r tests/integration/requirements.txt (line 1))
  Downloading httpretty-1.1.4.tar.gz (442 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting configparser (from pyds8k>=1.5.0->-r tests/integration/requirements.txt (line 1))
  Downloading configparser-7.2.0-py3-none-any.whl.metadata (5.5 kB)
Collecting six (from pyds8k>=1.5.0->-r tests/integration/requirements.txt (line 1))
  Downloading six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
Collecting charset-normalizer<4,>=2 (from requests->pyds8k>=1.5.0->-r tests/integration/requirements.txt (line 1))
  Downloading charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (35 kB)
Collecting idna<4,>=2.5 (from requests->pyds8k>=1.5.0->-r tests/integration/requirements.txt (line 1))
  Downloading idna-3.10-py3-none-any.whl.metadata (10 kB)
Collecting urllib3<3,>=1.21.1 (from requests->pyds8k>=1.5.0->-r tests/integration/requirements.txt (line 1))
  Downloading urllib3-2.3.0-py3-none-any.whl.metadata (6.5 kB)
Collecting certifi>=2017.4.17 (from requests->pyds8k>=1.5.0->-r tests/integration/requirements.txt (line 1))
  Downloading certifi-2025.1.31-py3-none-any.whl.metadata (2.5 kB)
Downloading pyds8k-1.5.0-py3-none-any.whl (146 kB)
Downloading configparser-7.2.0-py3-none-any.whl (17 kB)
Downloading requests-2.32.3-py3-none-any.whl (64 kB)
Downloading six-1.17.0-py2.py3-none-any.whl (11 kB)
Downloading certifi-2025.1.31-py3-none-any.whl (166 kB)
Downloading charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (144 kB)
Downloading idna-3.10-py3-none-any.whl (70 kB)
Downloading urllib3-2.3.0-py3-none-any.whl (128 kB)
Building wheels for collected packages: httpretty
  Building wheel for httpretty (pyproject.toml): started
  Building wheel for httpretty (pyproject.toml): finished with status 'done'
  Created wheel for httpretty: filename=httpretty-1.1.4-py3-none-any.whl size=28848 sha256=1d7fb05c46d87878b1d509c06cffb5c05c93695112c8b97617d45bec33fc3e87
  Stored in directory: /root/.cache/pip/wheels/80/35/fa/9591a3bab5bb15cc4819b90bb6ec497fccbff4f94126974837
Successfully built httpretty
Installing collected packages: urllib3, six, idna, httpretty, configparser, charset-normalizer, certifi, requests, pyds8k
Successfully installed certifi-2025.1.31 charset-normalizer-3.4.1 configparser-7.2.0 httpretty-1.1.4 idna-3.10 pyds8k-1.5.0 requests-2.32.3 six-1.17.0 urllib3-2.3.0
Running ds8000_volume_info integration test role

PLAY [testhost] ****************************************************************

TASK [ds8000_volume_info : Query volume by id] *********************************
fatal: [testhost]: FAILED! => {"msg": "The field 'module_defaults' has an invalid value, which includes an undefined variable.. 'ds8000_hostname' is undefined\n\nThe error appears to be in '/ansible_collections/ibm/ds8000/tests/output/.tmp/integration/ds8000_volume_info-r8tam9x8-ÅÑŚÌβŁÈ/tests/integration/targets/ds8000_volume_info/tasks/main.yml': line 18, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  block:\n    - name: Query volume by id\n      ^ here\n"}

PLAY RECAP *********************************************************************
testhost                   : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

ERROR: Command "ansible-playbook ds8000_volume_info-soukpzod.yml -i inventory" returned exit status 2.
FATAL: The 1 integration test(s) listed below (out of 1) failed. See error output above for details:
ds8000_volume_info

ACTUAL RESULTS

In the 2 aforememtioned Ubuntu versions we get:

WARNING: Using locale "C.UTF-8" instead of "en_US.UTF-8". Tests which depend on the locale may behave unexpectedly.
Installing requirements for Python 3.13 (controller)
Collecting pyds8k>=1.5.0 (from -r tests/integration/requirements.txt (line 1))
  Using cached pyds8k-1.5.0-py3-none-any.whl.metadata (1.0 kB)
Collecting requests (from pyds8k>=1.5.0->-r tests/integration/requirements.txt (line 1))
  Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting httpretty (from pyds8k>=1.5.0->-r tests/integration/requirements.txt (line 1))
  Using cached httpretty-1.1.4.tar.gz (442 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
          exec(compile('''
          ~~~~^^^^^^^^^^^^
          # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ...<31 lines>...
          exec(compile(setup_py_code, filename, "exec"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ''' % ('/tmp/pip-install-53_8dk6a/httpretty_a6fd3c5f96f446d3bd410f89e1bdcb8c/setup.py',), "<pip-setuptools-caller>", "exec"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-53_8dk6a/httpretty_a6fd3c5f96f446d3bd410f89e1bdcb8c/setup.py", line 29, in <module>
          from setuptools import setup, find_packages
      ImportError: cannot import name 'setup' from 'setuptools' (unknown location)
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
A command failed with status 1: /usr/bin/python /tmp/ansible-test-bmke4l9p-pip.py install --disable-pip-version-check -r tests/integration/requirements.txt -c requirements/constraints.txt
FATAL: Command "/usr/bin/python" returned exit status 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions