name: my failing job
tasks:
- name: my first task
run: echo hello world
- name: raise an error
run: exit 1
- name: my second task
run: echo bye world
And, from the middleware, I got:
{"level":"debug","time":1702025778,"message":"received job ed83c87901d24b14a7ed44735b130a8a at state PENDING (STATE_CHANGE)"}
...
{"level":"debug","time":1702025778,"message":"received job ed83c87901d24b14a7ed44735b130a8a at state FAILED (STATE_CHANGE)"}
{"level":"debug","time":1702025779,"message":"received job ed83c87901d24b14a7ed44735b130a8a at state FAILED (READ)"}
...
{"level":"debug","time":1702026006,"message":"received job ed83c87901d24b14a7ed44735b130a8a at state FAILED (READ)"}
Playing with a job middleware, I met a behaviour which I'm not quite sure. My dummy code is:
Following, I added a job which will fail:
And, from the middleware, I got:
But what I'm expecting is also a RUNNING (STATE_CHANGE). Am I wrong? Does it also happen to you or am I missing something? A similar result also got with a successful job (https://gist.github.com/Pirosauro/62545d0c957e10b52083df5a928af329)