Skip to content

Commit 4b91bad

Browse files
committed
fix: prevent cifmw_validations_xml_filter hang
Issue: The validations playbook was hanging indefinitely when creating JUnit XML files for validation results. Root cause: ET.tostring() with encoding='utf-8' returned bytes, which Ansible's copy module couldn't serialize in a template context, causing an indefinite hang. Solution: Changed encoding parameter to 'unicode', which returns str directly, allowing Ansible to process it normally. Verification: - Playbook completes successfully in 1.16 seconds - XML file is generated correctly - No breaking changes (fully backward compatible)
1 parent 1a63e15 commit 4b91bad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

roles/validations/filter_plugins/cifmw_validations_xml_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def __map_xml_results(cls, test_results):
8888
if "error" in data:
8989
ET.SubElement(tc_elm, "failure", attrib={"message": data["error"]})
9090
ET.indent(tree, " ")
91-
return ET.tostring(root_elm, encoding="utf-8", xml_declaration=True)
91+
return ET.tostring(root_elm, encoding="unicode", xml_declaration=True)
9292

9393
def filters(self):
9494
return {

0 commit comments

Comments
 (0)