Repository navigation
Treat unexpanded config references as unset in the WinRM Check step - #139
Merged
Merged
Conversation
The WinRMCheck step passes its optional settings through script-args,
e.g. "--proxy ${config.winrmproxy}". When a step's configuration has no
entry for one of these properties, Rundeck leaves the "${config.name}"
reference unexpanded, so the script received the literal text as the
value. With the proxy this made every check try to connect through a
proxy host named "${config.winrmproxy}" and fail with a name resolution
error; certpath had the same problem for https checks.
This affects jobs saved before the proxy fields were added and jobs
defined via YAML or the API that leave the optional fields out. The
script already treated "None" and empty values as unset; it now also
treats unexpanded references that way, via a small common.is_set_arg()
helper, for certpath, proxy and noproxy.
Add unit tests for the helper.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes address the reported configuration issue without identified blocking regressions.
No open issues 🎉
What changed in this PR
Fixes #138 by treating unresolved optional configuration references as unset in the WinRM Check step. The separate startup fix remains in #137.
Changes:
- Adds shared argument validation for missing values and unexpanded references.
- Applies validation to certificate and proxy options, with unit tests.
| File | Description |
|---|---|
| tests/test_common_args.py | Tests real, missing, and unresolved argument values. |
| contents/winrm-check.py | Validates optional certificate and proxy arguments. |
| contents/common.py | Adds the is_set_arg helper. |
Review effort: Balanced
fdevans
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
contents/common.py: newis_set_arg(value)helper. It returns False forNone,"","None", and a value that is an unexpanded${...}reference.contents/winrm-check.py: uses it for--certpath,--proxyand--noproxy, in place of the existingnot in ("None", "")checks. Nothing else changes.tests/test_common_args.py: unit tests for the helper.Why
Rundeck leaves
${config.name}unexpanded inscript-argswhen the step configuration has no entry for that property. The Check step then tries to connect through a proxy literally named${config.winrmproxy}. This breaks the step for jobs saved before the proxy fields existed and for jobs defined via YAML/API without the optional fields.Verification
python -m unittest discover -s tests: all pass, including the new tests.Connecting to ... DIRECTLY (no proxy configured)andConnection with host 127.0.0.1 successful:${config.winrmproxy}proxy error;None.This builds independently of #137, but you only see the effect once both are in.
Fixes #138