I'm running Prefect from tests - which works great. Currently Failed tasks log that failure at Info level, I wonder if Warning or Error might be more appropriate? It would certainly make it more obvious to me in logs/output
here's an example
a
Anna Geller
11/16/2021, 11:46 AM
So the line you are referring to is only informing that a signal has been raised, which seems to be a valid INFO log message. But you can raise on exception if you want:
Copy code
# PrefectStateSignals are trapped and turned into States
except signals.PrefectStateSignal as exc:
<http://self.logger.info|self.logger.info>(
"{name} signal raised: {rep}".format(
name=type(exc).__name__, rep=repr(exc)
)
)
if raise_on_exception:
raise exc
new_state = exc.state
In general, Prefect handles the state transition for you, so you shouldn’t have to worry about it.
j
John Shearer
11/16/2021, 12:00 PM
Thanks Anna.
only informing that a signal has been raised, which seems to be a valid INFO log message
yes, definitely valid.
I'm just thinking it might be useful to log it as a warning, for increased visibility in logs (especially when not running through a prefect server (locally or on CI). (I can catch the exception during dev and the behaviour is of the program is correct, this is only about making this more visible in log out)
Does that make sense?
a
Anna Geller
11/16/2021, 12:07 PM
sure. let me open an issue for it.
@Marvin open “Change the log level to Warning when raising signal from the Runner”
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.