Skip to content

vm_replication_info: fix remaining bare-string assert conditional - #386

Merged
ddemlow merged 1 commit into
mainfrom
fix/vm-replication-info-bare-conditional
Oct 29, 2026
Merged

ddemlow merged 1 commit into
mainfrom
fix/vm-replication-info-bare-conditional

Conversation

@ddemlow

@ddemlow ddemlow commented Oct 29, 2026

Copy link
Copy Markdown
Member

Summary

Same root cause as #385 (ansible-core 2.17.4 rejects a bare non-empty string used directly
in a conditional, with "Conditionals must have a boolean result"), but hit on live
API-response fields (vm_name, remote_cluster) rather than a static config value, in a file
#385 didn't scope: 10_vm_replication_info.yml is included by vm_replication_info's
main.yml rather than being main.yml itself, so it wasn't caught by that PR's targeted
search.

Found 2026-10-29 on the validation run for #384/#385: vm_replication and
vm_clone__replicated both passed clean on that run, but vm_replication_info still failed
on this one additional occurrence of the same pattern, at
tests/integration/targets/vm_replication_info/tasks/10_vm_replication_info.yml:78.

Fix

Same approach as #385 — | length > 0 instead of relying on implicit bare-string
truthiness, across the 4 occurrences in this file's one assert.that block
(vm_name/remote_cluster for each of two VM records).

Scope note

A broader sweep while investigating this found roughly 38 more candidate sites across the
collection using the same bare-truthy idiom. Tracked separately as an issue
(linked once filed) rather than fixed wholesale here — this PR's scope is just unblocking
vm_replication_info.

Test plan

  • YAML syntax valid (done locally)
  • Re-run integ-test.yml's vm_replication_info target after merge

Same root cause as #385 (ansible-core 2.17.4 rejects a bare non-empty
string used directly in a conditional), but on live API-response fields
(vm_name, remote_cluster) rather than a static config value, in a file
#385 didn't scope (10_vm_replication_info.yml, included by main.yml rather
than main.yml itself).

Found 2026-10-29 on the validation run for #384/#385: vm_replication and
vm_clone__replicated both passed clean, but vm_replication_info still
failed on this one additional occurrence of the same pattern.

A broader sweep found ~38 candidate sites across the collection using this
same bare-truthy idiom -- tracked separately as an issue for XLab rather
than fixed wholesale here, since this PR's scope is just unblocking this
one target.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ddemlow
ddemlow merged commit 3e5d503 into main Oct 29, 2026
6 checks passed
@ddemlow
ddemlow deleted the fix/vm-replication-info-bare-conditional branch October 29, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant