https://prefect.io logo
Title
n

Nace Plesko

08/29/2022, 11:04 PM
Hi all! I'm just getting into Prefect and trying to understand how everything works. I'm not starting a prefect project from scratch, but trying to build on top of the existing one (mainly working on fixes now). The issue I'm running into right now that I can't find the answer to online is that
ShellTask
is not logging all the outputs from the script that it's running. I am looking at https://docs-v1.prefect.io/api/latest/tasks/shell.html#shelltask and seems like just setting
stream_output=True
should do the job, but I'm still seeing just
Command failed with exit code 1
. I also tried setting
return_all=True
and
log_stderr=True
, but still the same behavior. Has anyone ran into this issue in the past?
1
m

Matt Conger

08/29/2022, 11:51 PM
Hey Nance, check out this older thread here. They ran into a similar issue and were able to get it resolved, lmk if this helps. About half way through the thread the ShellTask and exit code 1 is discussed. Also, if you are just starting out with Prefect, I would definitely recommend starting with the Prefect 2 version that we are running. Out of curiosity, is there anything that pushed you to work with the 1.0 version? https://prefect-community.slack.com/archives/CL09KU1K7/p1657031249118379
n

Nace Plesko

08/29/2022, 11:55 PM
@Matt Conger thank you for the response. I'll take a look at that thread, thank you! About Prefect 1... I am not starting a new project, but fixing what's already there. I think it was initially set up about 2 years ago
m

Matt Conger

08/29/2022, 11:58 PM
Sound good! We have a ton of cool stuff in Prefect 2 that we've come out. As you get more into Prefect I'd highly recommend checking the new version out as well. Hope the thread helps out
n

Nace Plesko

08/30/2022, 12:02 AM
Is Prefect 1 still being maintained? If so, I'd rather opt out of upgrading it to Prefect 2 at this moment since my team and I are in a time crunch and are trying to do just absolutely necessary stuff right now.
Thanks @Nate for reaching out! Just wanted to give quick tldr here in case anyone comes back to this thread. I realized that when running scripts in docker the output is different than from when I run them locally (some errors messages are not showing up), so the lack of error messages in Prefect in fact doesn't seem like it's an issue with Prefect, but with my docker image