I have produced the following, cut down, example pipline.yml, to reproduce the strange behavior.
steps:
- name: 'Faily dependency'
key: dep-0
command: 'exit 1'
- name: "Doesn't run"
key: dep-1
command: echo "I don't run because the step I depend on Failed"
depends_on: dep-0
- name: "I Don't run because the step I depend on's dependency failed"
key: dep-2
command: echo 'I don't run because my dependencies, dependency failed'
depends_on: dep-1
- name: "I should not run, because the step I depend on didn't run"
command: echo 'Why am I running?'
depends_on: dep-2
allow_dependency_failure: true
Expected behaviour
only the first step should run, because:
dep-1 depends on dep-0, which failed, so it doesn't run.
dep-2 depends on dep-1, which didn't run, so it shouldn't run
Final step depends on dep-2 which didn't run, so it shouldn't run
Actual behaviour
The first step and the final step both run.
From the docs:
You can add the allow_dependency_failure attribute to any step that has dependencies. The step
will then run when the depended-on jobs complete, even if those jobs have failed
In my case the depended-on job never ran. I wonder if my dep-2 is getting treated as excluded, so my final step ends up ignoring it's dependency?
I have produced the following, cut down, example pipline.yml, to reproduce the strange behavior.
Expected behaviour
only the first step should run, because:
Actual behaviour
The first step and the final step both run.
From the docs:
In my case the depended-on job never ran. I wonder if my
dep-2
is getting treated asexcluded
, so my final step ends up ignoring it's dependency?Screen shot of run pipeline