Skip to content

Commit

Permalink
Merge pull request #266 from DUNE-DAQ/plasorak/quiet-not-implemented
Browse files Browse the repository at this point in the history
Remove errors from log and shell
  • Loading branch information
plasorak authored Oct 16, 2024
2 parents cc7b6eb + 2232b25 commit e4f484c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/drunc/broadcast/client/broadcast_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, broadcast_configuration:BroadcastClientConfHandler):
message_format = BroadcastMessage,
)
case _:
self.log.warning('Could not understand the BroadcastHandler technology you want to use, you will get no broadcast!')
self.log.info('Could not understand the BroadcastHandler technology you want to use, you will get no broadcast!')

def stop(self):
if self.implementation:
Expand Down
2 changes: 1 addition & 1 deletion src/drunc/broadcast/server/broadcast_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, name:str, configuration:BroadcastSenderConfHandler, session:s
self.implementation = None

if self.impl_technology is None:
self.logger.warning('There is no broadcasting service!')
self.logger.info('There is no broadcasting service!')
return

from drunc.broadcast.types import BroadcastTypes
Expand Down
4 changes: 2 additions & 2 deletions src/drunc/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ def propagate_to_child(child, command, command_data, token, response_lock, respo
message = f'Propagated {command} to children ({child.name}) successfully',
)
else:

level = BroadcastType.DEBUG if response.flag == ResponseFlag.NOT_EXECUTED_NOT_IMPLEMENTED else BroadcastType.CHILD_COMMAND_EXECUTION_FAILED
self.broadcast(
btype = BroadcastType.CHILD_COMMAND_EXECUTION_FAILED,
btype = level,
message = f'Propagating {command} to children ({child.name}) failed: {ResponseFlag.Name(response.flag)}. See its logs for more information and stacktrace.',
)

Expand Down
12 changes: 6 additions & 6 deletions src/drunc/utils/shell_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def text(verb="not executed"):
if response.flag in [
ResponseFlag.NOT_EXECUTED_NOT_IMPLEMENTED,
]:
self._log.info(text())
self._log.debug(text())
elif response.flag in [
ResponseFlag.NOT_EXECUTED_NOT_IN_CONTROL,
]:
Expand All @@ -147,7 +147,7 @@ def text(verb="not executed"):
if response.data.Is(Stacktrace.DESCRIPTOR):
stack = unpack_any(response.data, Stacktrace)
#stack_txt = 'Stacktrace [bold red]on remote server![/bold red]\n' # Temporary - bold doesn't work
stack_txt = 'Stacktrace on remote server!\n'
stack_txt = 'Stacktrace on remote server!\n'
last_one = ""
for l in stack.text:
stack_txt += l+"\n"
Expand All @@ -172,9 +172,9 @@ def text(verb="not executed"):
except DruncServerSideError as e:
self._log.error(f"Exception thrown from child: {e}")
return dr

# raise DruncServerSideError(error_txt, stack_txt, server_response=dr)


def send_command(self, command:str, data=None, outformat=None, decode_children=False):
import grpc
Expand Down Expand Up @@ -274,7 +274,7 @@ def get_driver(self, name:str=None) -> GRPCDriver:
return list(self._drivers.values())[0]
except KeyError:
self._log.error(f'FSM Commands cannot be sent until the Session is booted')
raise SystemExit(1) # used to avoid having to catch multiple Attribute errors when this function gets called
raise SystemExit(1) # used to avoid having to catch multiple Attribute errors when this function gets called

def get_token(self) -> Token:
return self._token
Expand All @@ -300,7 +300,7 @@ def debug(self, *args, **kwargs) -> None:
def critical(self, *args, **kwargs) -> None:
self._log.critical(*args, **kwargs)


def print_status_summary(self) -> None:
status = self.get_driver('controller').get_status().data.state
available_actions = [command.name for command in self.get_driver('controller').describe_fsm().data.commands]
Expand Down

0 comments on commit e4f484c

Please sign in to comment.