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

[Bug] dlevel broken via custom pwsh connection 'hack' #275

Open
lowlydba opened this issue Nov 9, 2024 · 2 comments
Open

[Bug] dlevel broken via custom pwsh connection 'hack' #275

lowlydba opened this issue Nov 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@lowlydba
Copy link
Owner

lowlydba commented Nov 9, 2024

Describe the bug
On dlevel tests, /setup_sqlserver_test_plugins/connection_plugins/local_pwsh.py no longer works. Presumably this is from there being updates to the original python file that this replaces.

The full traceback is:
Traceback (most recent call last):
File "/root/ansible/lib/ansible/executor/task_executor.py", line 176, in run
res = self._execute()
File "/root/ansible/lib/ansible/executor/task_executor.py", line 610, in _execute
self._connection = self._get_connection(cvars, templar, current_connection)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/ansible/lib/ansible/executor/task_executor.py", line 992, in _get_connection
connection, plugin_load_context = self._shared_loader_obj.connection_loader.get_with_context(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
conn_type,
^^^^^^^^^^
...<3 lines>...
ansible_playbook_pid=to_text(os.getppid())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/root/ansible/lib/ansible/plugins/loader.py", line 895, in get_with_context
self._module_cache[path] = self._load_module_source(resolved_type_name, path)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/ansible/lib/ansible/plugins/loader.py", line 833, in _load_module_source
spec.loader.exec_module(module)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "", line 1022, in exec_module
File "", line 488, in _call_with_frames_removed
File "/root/ansible_collections/lowlydba/sqlserver/tests/output/.tmp/integration/user-1rnoz0cd-ÅÑŚÌβŁÈ/tests/integration/targets/setup_sqlserver_test_plugins/connection_plugins/local_pwsh.py", line 30, in
from ansible.module_utils.compat import selectors
ImportError: cannot import name 'selectors' from 'ansible.module_utils.compat' (/root/ansible/lib/ansible/module_utils/compat/init.py)
fatal: [testhost]: FAILED! => {
"msg": "Unexpected failure during module execution: cannot import name 'selectors' from 'ansible.module_utils.compat' (/root/ansible/lib/ansible/module_utils/compat/init.py)",
"stdout": ""
}

To Reproduce
See all recent CI runs for Linux.

Expected behavior
We can use local pwsh to test this collection on the runner.

@lowlydba lowlydba added the bug Something isn't working label Nov 9, 2024
@lowlydba
Copy link
Owner Author

lowlydba commented Nov 9, 2024

@briantist I haven't dug into this at all yet, but wanted to check in if you had seen it or were aware, to avoid duplicating any efforts.

No worries if not, I'll probably try to spend some time on it before the next minor release as it seems like it might be a blocker for the CI working .

@briantist
Copy link
Collaborator

I haven't looked at your actual CI results yet but it might be the same issue as this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants