https://prefect.io logo
Title
a

ale

04/01/2021, 7:45 PM
Hey folks 😒imple_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

Jim Crist-Harif

04/01/2021, 7:49 PM
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

ale

04/01/2021, 7:52 PM
My current use case is the ability to send those logs as part of a Slack notification
j

Jim Crist-Harif

04/01/2021, 7:52 PM
Ah, gotcha.
a

ale

04/01/2021, 7:53 PM
Does it make sense to you Jim?
j

Jim Crist-Harif

04/01/2021, 7:53 PM
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

Zanie

04/01/2021, 7:55 PM
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

ale

04/01/2021, 7:57 PM
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 😒imple_smile:
👍 1