awx
awx copied to clipboard
Use absolute instead of relative imports
SUMMARY
Although Ansible without mitogen works without this PR it is not possible to use it with Mitogen.
ISSUE TYPE
- Bug, Docs Fix or other nominal change
Without the fix Mitogen's users should expect the following error:
exception: "Traceback (most recent call last):\r\n File \"/home/runner/.ansible/tmp/ansible_mitogen_runner_w8wene42/job_launch.py\", line 177, in <module>\r\n from ..module_utils.controller_api import ControllerAPIModule\r\nImportError: attempted relative import with no known parent package\r\n"
COMPONENT NAME
- Collection
AWX VERSION
awx: 24.3.1.dev11+g207ab32994
ADDITIONAL INFORMATION
This is similar to https://github.com/ansible-collections/amazon.aws/pull/809
The problem is that this is re-packaged under another namespace.
Thank @AlanCoding for your feedbacks. Would you be able to point me in the right direction to adresse the repackaging issue?
awx.awx becomes ansible.controller on automation hub
Thank you for the hint @fosterseth. Now I'm confused because I believe thatawx.awx
is the correct name when the collection is used by end users but after the repackaging it is named ansible.controller
.
So basically, if instead of doing absolute import with awx.awx
I use ansible.controller
the CI should be happy but what about the end users 🤔
Anyhow, I'm not familiar with the re-packaging and the CI of AWX. I will have to look at this closer maybe next week.