Hello, I'm currently using the ShellTask with a piped command and it seems like prefect is only checking the exit status of the last command, i.e. if I run
foo | bar
it will only check the exit status of
bar
any ideas on how to make prefect raise an error if either tasks fails?
k
Kyle Moon-Wright
03/15/2021, 4:12 PM
Hey @Will Milner,
I’ll definitely need to dive deeper on piped shell commands using the ShellTask. For the time being you can certainly use multiple ShellTasks to gain the monitorability of each command, but this isn’t ideal of course so I’ll need to get more information.
w
Will Milner
03/15/2021, 4:18 PM
one possible solution I found was to use the
helper_script
with
set -o pipefail
🤔 1
k
Kyle Moon-Wright
03/15/2021, 4:55 PM
That’s awesome! Not only a great solution, but I think something that can be a native configuration of the ShellTask so I’m going to pass this forward to the team.
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.