Bug 2209393

Summary: ansible-test doesn't have access to ansible-core's vendored dependencies
Product: Red Hat Enterprise Linux 8 Reporter: Dimitri Savineau <dsavinea>
Component: ansible-coreAssignee: Dimitri Savineau <dsavinea>
Status: CLOSED ERRATA QA Contact: Matt Clay <mclay>
Severity: medium Docs Contact:
Priority: high    
Version: CentOS StreamCC: bstinson, jwboyer
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ansible-core-2.15.0-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2212445 (view as bug list) Environment:
Last Closed: 2023-11-14 15:32:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version: 2.15.0
Embargoed:
Bug Depends On:    
Bug Blocks: 2212445    

Description Dimitri Savineau 2023-05-23 18:56:04 UTC
This bug was initially created as a copy of Bug #2208781

I am copying this bug because: 



Description of problem:

The ansible-core packages vendors some required dependencies instead of properly packaging them as RPMs. These are installed in the ansible._vendor directory. However, the ansible_test module does not add the vendored modules sys.path like ansible does. Therefore, ansible-test is unable to import some of the dependencies it needs.


Version-Release number of selected component (if applicable):
$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.2 (Plow)
$ rpm -q ansible-test
ansible-test-2.14.2-4.el9.x86_64

How reproducible:
Any time ansible-test tries to import a required dependency that RHEL has decided to vendor


Steps to Reproduce:
Here is just one example where ansible-test code fails to import modules

1. Clone a collection such as https://github.com/ansible-collections/community.general that has a tests/config.yml
2. Attempt to run an ansible-test command such as `ansible-test units`

Actual results:
FATAL: The "packaging" module is required to parse config: No module named 'packaging

Expected results:
ansible-test should be able to import the packaging module and successfully run the unit tests


Additional info:

Comment 8 errata-xmlrpc 2023-11-14 15:32:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (ansible-core bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6956