snakemake-github-action icon indicating copy to clipboard operation
snakemake-github-action copied to clipboard

How to detect if steps would hang

Open hepcat72 opened this issue 2 years ago • 1 comments

I had a problem in my snakemake workflow that was "hidden" by the fact that the tests run on github happily succeeded when they should have hung. When I ran the test locally with --printshellcmds, I encountered a hang due to a command from one of the aggregate steps that was running cat > outfile.

I tried to look up why or how the github actions succeed. I assume that it somehow effectively supplies a control-d to any process that waits for input on STDIN? (Or perhaps there's some sort of shell trickery I'm unaware of that just closes STDIN?)

So I'm wondering if there's some way to tell the github action to report an error if the command consumes (or waits for) STDIN? I of course fixed my workflow, but I would just like there to be a way to be better assured that if the tests run via github action, then there is no functional issue with the workflow if this type of issue were to crop up again.

hepcat72 avatar Jun 13 '23 17:06 hepcat72

If your workflow does not produce the desired output file, it should fail. The waiting time for outputs to be created is usually 5 seconds, controlled by the --latency-wait param. Maybe you can fix this in your workflow to get the test fail under the desired conditions?

m-jahn avatar Sep 23 '25 10:09 m-jahn