Skip to content

Commit c97f3c7

Browse files
naspiratoblinkov
authored andcommitted
Allure report: fix date format for filtering journalctrl (#15524)
1 parent f68af90 commit c97f3c7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ydb/tests/olap/lib/allure_utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,16 @@ def _set_logs_command(test_info: dict[str, str], start_time: float, end_time: fl
5959
tz = timezone('Europe/Moscow')
6060
start = datetime.fromtimestamp(start_time, tz)
6161
end = datetime.fromtimestamp(end_time, tz)
62+
start_short = start.strftime('%Y-%m-%d %H:%M:%S')
63+
end_short = end.strftime('%Y-%m-%d %H:%M:%S')
6264
start_iso = start.isoformat()
6365
end_iso = end.isoformat()
64-
time_cmd = f'-S "{start}" -U "{end}"'
66+
time_cmd = f'-S "{start_short}" -U "{end_short}"'
6567
time_cmd_iso = f'-S "{start_iso}" -U "{end_iso}"'
6668
not_ask_for_key = '-x \"-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\"'
6769

68-
cmd = f"parallel-ssh {hosts_cmd} -i {not_ask_for_key} 'ulimit -n 100500;unified_agent select {time_cmd_iso} -s kikimr' 2>/dev/null 1>kikimr.log"
69-
dmesg_cmd = f"parallel-ssh {hosts_cmd} -i {not_ask_for_key} 'sudo journalctl -k {time_cmd} --grep ydb' 2>/dev/null 1>journalctrl.log"
70+
cmd = f"parallel-ssh {hosts_cmd} -i {not_ask_for_key} 'ulimit -n 100500;unified_agent select {time_cmd_iso} -s kikimr' 2>/dev/null 1> kikimr.log"
71+
dmesg_cmd = f"parallel-ssh {hosts_cmd} -i {not_ask_for_key} 'sudo journalctl -k {time_cmd} --grep ydb' 2>/dev/null 1> journalctrl.log"
7072
test_info['kikimr_log'] = f'<details><code>{cmd}</code></details>'
7173
test_info['kernel_log'] = f'<details><code>{dmesg_cmd}</code></details>'
7274

0 commit comments

Comments
 (0)