Hello all Hope that you are well. I have a flow ...
# prefect-server
a
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
Hi @Aniruddha Sengupta, not quite getting. You have a ShellTask that has no exit code? And it crashes the entire Prefect server?
a
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
I think it does. I can confused if it crashes the Flow or the entire Server?
a
The server which runs inside a virtual machine
k
Does it only happen when running inside a Flow? Or does
make_shell
also kill the Server if you run in independently?
a
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
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
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.
k
Ah ok no worries! Glad you figured it out