Factual / drake

Data workflow tool, like a "Make for data"
Other
1.48k stars 110 forks source link

drake's exit code is 1 even if is succeed #141

Closed calfzhou closed 10 years ago

calfzhou commented 10 years ago

with drake latest develop version

just a very simple drake workflow:

a <-
    echo hello >$OUTPUT

then run $ drake --auto --debug, then check drake.log:

2014-07-17 17:10:59,059 DEBUG Drake 0.1.6
2014-07-17 17:10:59,086 DEBUG Clojure version: {:major 1, :minor 6, :incremental 0, :qualifier nil}
2014-07-17 17:10:59,090 DEBUG parsed options: {:workflow ./Drakefile, :logfile drake.log, :jobs 1, :plugins plugins.edn, :tmpdir .drake, :auto true, :debug true}
2014-07-17 17:10:59,124 DEBUG parsed targets: [=...]
2014-07-17 17:10:59,125 DEBUG looking for plugins conf file /data0/zhouji/test/test-d/plugins.edn
2014-07-17 17:10:59,125 DEBUG no plugins file found at /data0/zhouji/test/test-d/plugins.edn
2014-07-17 17:10:59,227 DEBUG Parsing finished in 0.07s
2014-07-17 17:10:59,246 DEBUG Selecting steps finished in 0.02s
2014-07-17 17:10:59,274 DEBUG selected (expanded) targets: ({:match-type :output, :index 0, :pos 0, :build nil})
2014-07-17 17:10:59,280 INFO Running 1 steps with concurrence of 1...
2014-07-17 17:10:59,318 INFO·
2014-07-17 17:10:59,321 INFO --- 0. Running (missing output): a <-·
2014-07-17 17:10:59,331 DEBUG step's vars saved to .drake/a/vars-2014-07-17_17.10.57_+0800
2014-07-17 17:10:59,353 DEBUG run-interpreter: finished running .drake/shell-70671efabcbc756ebb12cab4d42da22b.bat
2014-07-17 17:10:59,353 DEBUG run-interpreter: stdout saved to .drake/a/stdout-2014-07-17_17.10.57_+0800
2014-07-17 17:10:59,354 DEBUG run-interpreter: stderr saved to .drake/a/stderr-2014-07-17_17.10.57_+0800
2014-07-17 17:10:59,356 INFO --- 0: a <-  -> done in 0.02s
2014-07-17 17:10:59,363 INFO Done (1 steps run).
2014-07-17 17:10:59,365 ERROR drake:·
2014-07-17 17:10:59,365 DEBUG core/shutdown: Running standalone; calling (shutdown-agents)

There is a no-message error, and the error code is 1.

calfzhou commented 10 years ago

might be involved by commit a9432adbb2bf7f35404c8dc756f4b8c658e9abc1 and merged via e607b63527fad39edb793b8625a1f690b1aa6fee

calfzhou commented 10 years ago

in commit a9432adbb2bf7f35404c8dc756f4b8c658e9abc1, shutdown always throws exit-code. But line R956~R958 will catch it even if exit-code equals 0. It should check exit-code.

amalloy commented 10 years ago

Thanks. Committed f15894d6