snakemake / snakemake-github-action

A Github action for running a Snakemake workflow
MIT License
51 stars 12 forks source link

How to detect if steps would hang #29

Open hepcat72 opened 1 year ago

hepcat72 commented 1 year ago

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.