Skip console output logging for dump_logs command #4

Closed
opened 2025-12-28 18:13:48 +00:00 by sami · 2 comments
Owner

Originally created by @abereziny on GitHub (Nov 2, 2022).

Originally assigned to: @abereziny on GitHub.

Console output for node logs from dump_logs command have no practical use and uses too much time in CI system.
It will be nice to skip it

Code of interest:
https://github.com/nspcc-dev/neofs-testlib-plugin-sbercloud/blob/master/src/neofs_testlib_plugin_sbercloud/sbercloud_host.py#L143
https://github.com/nspcc-dev/neofs-testlib/blob/master/src/neofs_testlib/shell/ssh_shell.py#L58

Proposal is to add no_console: bool = False option to
https://github.com/nspcc-dev/neofs-testlib/blob/master/src/neofs_testlib/shell/interfaces.py#L35

and use it like

options = CommandOptions()
options.no_console = True
result = shell.exec(f"journalctl --no-pager {filters}", options)

https://github.com/nspcc-dev/neofs-testlib/blob/master/src/neofs_testlib/shell/ssh_shell.py#L39

def wrapper(shell: "SSHShell", command: str, options: CommandOptions, *args, **kwargs) -> CommandResult:

if not options.no_console:
   logger.info(log_message)

Originally created by @abereziny on GitHub (Nov 2, 2022). Originally assigned to: @abereziny on GitHub. Console output for node logs from dump_logs command have no practical use and uses too much time in CI system. It will be nice to skip it Code of interest: https://github.com/nspcc-dev/neofs-testlib-plugin-sbercloud/blob/master/src/neofs_testlib_plugin_sbercloud/sbercloud_host.py#L143 https://github.com/nspcc-dev/neofs-testlib/blob/master/src/neofs_testlib/shell/ssh_shell.py#L58 Proposal is to add `no_console: bool = False` option to https://github.com/nspcc-dev/neofs-testlib/blob/master/src/neofs_testlib/shell/interfaces.py#L35 and use it like ``` options = CommandOptions() options.no_console = True result = shell.exec(f"journalctl --no-pager {filters}", options) ``` https://github.com/nspcc-dev/neofs-testlib/blob/master/src/neofs_testlib/shell/ssh_shell.py#L39 ``` def wrapper(shell: "SSHShell", command: str, options: CommandOptions, *args, **kwargs) -> CommandResult: if not options.no_console: logger.info(log_message) ```
sami 2025-12-28 18:13:48 +00:00
Author
Owner

@abereziny commented on GitHub (Nov 2, 2022):

@vdomnich-yadro Could you please review this idea?

@abereziny commented on GitHub (Nov 2, 2022): @vdomnich-yadro Could you please review this idea?
Author
Owner

@abereziny commented on GitHub (Nov 18, 2022):

Can be closed as fixed

@abereziny commented on GitHub (Nov 18, 2022): Can be closed as fixed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-testlib#4
No description provided.