[rp-reporter] Sort logs chronologically
Related-Prod: PRODX-48948
Change-Id: I4928fab2f2ac12a5b1d8688cbbbd7c0de8470197
diff --git a/rp_reporter/rp_reporter/batch_reporter.py b/rp_reporter/rp_reporter/batch_reporter.py
index e40a13f..3f904d2 100755
--- a/rp_reporter/rp_reporter/batch_reporter.py
+++ b/rp_reporter/rp_reporter/batch_reporter.py
@@ -101,6 +101,8 @@
if ovn:=jmespath.search("items[*].spec.features.neutron.backend", osdpl_dict):
tags["neutron.backend"] = ovn[0]
+ else:
+ tags["neutron.backend"] = "ovs"
if nova_images:=jmespath.search("items[*].spec.features.nova.images.backend", osdpl_dict):
tags["nova.images.backend"] = nova_images[0]
@@ -225,6 +227,7 @@
description.rockoon_version = tags.get("rockoon_version")
case "tempest-runner-k8s":
title = "Tempest"
+
test_results_files = [file_url
for file_url in child.get_link_from_description()
if "tempest_report.xml" in file_url]
@@ -314,7 +317,9 @@
print("Pushing new description to job...")
try:
job.description = (job.description +
- f"\n\n Link to ReportPortal {report_url}")
+ f"<br><br> "
+ f"<a href='{report_url}'>Link to ReportPortal</a> <br>"
+ )
except Exception as e:
print(f"Can't push description to {job=}: {e}")
print(f" ʕノ•ᴥ•ʔノ Completed")
diff --git a/rp_reporter/rp_reporter/report_from_xml.py b/rp_reporter/rp_reporter/report_from_xml.py
index ac8661b..652907f 100644
--- a/rp_reporter/rp_reporter/report_from_xml.py
+++ b/rp_reporter/rp_reporter/report_from_xml.py
@@ -285,6 +285,9 @@
level=level,
item_id=item_id
)
+ # Sleep to save chronological sorting for logs as is
+ # reportportal has timestamps in milliseconds
+ time.sleep(0.001)
# timestamp() 1739905243451 in milliseconds
# tc.time datetime.timedelta(microseconds=259000)