WinRM Check Step always fails with NameError: name 'enabledHttpDebug' is not defined
The "WinRM Check Step" workflow step (WinRMCheck, contents/winrm-check.py) fails on every run before it tries to connect.
winrm-check.py has this at module level:
if enabledHttpDebug:
httpclient_logging_patch(logging.DEBUG)
Neither enabledHttpDebug nor httpclient_logging_patch is defined or imported in winrm-check.py. Both live only in winrm-exec.py and winrm-filecopier.py, and the WinRMCheck provider has no enabledhttpdebug config property in plugin.yaml. The block came in with 8aa55a4 ("feat: allow defining arbitrary python interpreter, ...", 2024-12-03), so it looks like it was copied over from the other two scripts.
Steps to reproduce
From a checkout of main (002f4fd):
python3 contents/winrm-check.py --hostname h --username u --password p --authentication basic --transport http --port 5985
Or add the "WinRM Check Step" to a job in Rundeck and run it.
Actual
Traceback (most recent call last):
File ".../contents/winrm-check.py", line 263, in <module>
if enabledHttpDebug:
^^^^^^^^^^^^^^^^
NameError: name 'enabledHttpDebug' is not defined
This happens no matter what options are used and whether or not pywinrm is installed. (I reproduced it with Python 3.15, both with and without pywinrm 0.5.0 in a venv.)
Expected
The step runs: it reports missing Python packages if there are any, or connects to the host and runs the check.
Affected versions
Every release containing 8aa55a4. By git tag --contains 8aa55a4 that is 3.3.0 and later; 2.1.3 and earlier don't have the block. I reproduced it both by running the script directly and on a local Rundeck 6.4.0-SNAPSHOT server.