Hey folks :simple_smile: Regarding ShellTask, woul...
# prefect-contributors-archived
a
Hey folks simple smile Regarding ShellTask, wouldn’t it be useful to return the logs generated by the shell command as part of the FAIL message when the task fails? Maybe we can add a parameter that keeps the current behaviour as a default to avoid breaking changes. I would find it very useful for return useful details when a DbtShellTask fails… What do you think?
j
Can you expand on this a bit? What would you want to do with access to the logs in the task, vs streaming them to cloud as is (as added/improved in https://github.com/PrefectHQ/prefect/pull/4322).
a
My current use case is the ability to send those logs as part of a Slack notification
j
Ah, gotcha.
a
Does it make sense to you Jim?
j
The current
ShellTask
is kind of becoming bloated with options, how we expose this may require some thought. I do agree that the use case makes sense though.
I'll open an issue.
Actually, is that not done already if you pass
return_all=True
?
z
It should be attached to the state, yeah.
If you want it to be a part of the state message I think this is a good case for a state handler.
a
Yes it is! Sorry guys, I’m still on
0.13.13
where this is not available. Hope to upgrade to the latest very soon! Thanks a lot for the guidance simple smile
👍 1