Repository navigation
vm_replication_info: fix remaining bare-string assert conditional - #386
Merged
Merged
Conversation
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>
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.
Summary
Same root cause as #385 (
ansible-core2.17.4 rejects a bare non-empty string used directlyin a conditional, with
"Conditionals must have a boolean result"), but hit on liveAPI-response fields (
vm_name,remote_cluster) rather than a static config value, in a file#385 didn't scope:
10_vm_replication_info.ymlis included byvm_replication_info'smain.ymlrather than beingmain.ymlitself, so it wasn't caught by that PR's targetedsearch.
Found 2026-10-29 on the validation run for #384/#385:
vm_replicationandvm_clone__replicatedboth passed clean on that run, butvm_replication_infostill failedon 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 > 0instead of relying on implicit bare-stringtruthiness, across the 4 occurrences in this file's one
assert.thatblock(
vm_name/remote_clusterfor 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
integ-test.yml'svm_replication_infotarget after merge