Hello all
Hope that you are well.
I have a flow which runs a series of shell commands but the first command is to make a Singularity image with the command
make_shell
. This command does not return any exit codes, so when I tried to run it as a standalone task, my server crashed. What would be the best way to ensure that this command is passed off first before executing other shell tasks?
Thanks,
k
Kevin Kho
03/07/2022, 2:29 PM
Hi @Aniruddha Sengupta, not quite getting. You have a ShellTask that has no exit code? And it crashes the entire Prefect server?
a
Aniruddha Sengupta
03/07/2022, 2:32 PM
Hi Kevin, yes so essentially I have a bash script which I have converted to ShellTasks but the very first line in the original script is
make_shell
.
I do not think this command returns an exit code, it just creates an environment to perform tasks (a bit like activating a Python virtual environment).
So I was just wondering what would be the best way to tackle this. Does this make sense?
k
Kevin Kho
03/07/2022, 2:49 PM
I think it does. I can confused if it crashes the Flow or the entire Server?
a
Aniruddha Sengupta
03/07/2022, 3:03 PM
The server which runs inside a virtual machine
k
Kevin Kho
03/07/2022, 3:05 PM
Does it only happen when running inside a Flow? Or does
make_shell
also kill the Server if you run in independently?
a
Aniruddha Sengupta
03/07/2022, 3:06 PM
It only happens inside a Flow, inside a terminal ithin the virtual machine takes about two seconds. And the Flow is configured to be a LocalRun inside the same virtual machine.
k
Kevin Kho
03/07/2022, 3:08 PM
Pretty confused why that would crash the server if running it outside does not. You have to restart the server when this happens with
prefect server start
?
a
Aniruddha Sengupta
03/07/2022, 5:44 PM
Hey Kevin
So it turns out I was being stupid and the Prefect task was failing because the command had already been run. So it was an error on my end.
My apologies for this.
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.