flowpipe
flowpipe copied to clipboard
Should steps that depend on a skipped step be executed?
Consider this pipeline with a step that is always skipped:
mod "local" {
title = "flowpipe-mod-issues"
}
pipeline "dependencies_should_not_be_run" {
step "transform" "foo" {
if = false
value = "foo"
}
// this works all the time
step "transform" "foo_out" {
value = step.transform.foo
}
// executes, but fails
// should it be executed at all?
step "transform" "foo_value" {
value = step.transform.foo.value
}
}
Here is the output:
~/src/flowpipe-mod-issues $ flowpipe pipeline run dependencies_should_not_be_run
[flowpipe] Execution ID: exec_co6qo0ko47mp6tkrq49g
[dependencies_should_not_be_run] Starting pipeline
[dependencies_should_not_be_run.foo] Skipped
[dependencies_should_not_be_run] Internal Error: foo_value: Unsupported attribute: This object does not have an attribute named "value".
(/Users/nathan/src/flowpipe-mod-issues/mod.fp:20,31-37)
[dependencies_should_not_be_run] Failed 21ms
My suggestion is that any step that depends on a skipped step should also be skipped .... it shouldn't be executed and fail. That would avoid the need for if =
statements through all the dependent steps.
Is there any case where we want a step that depends on a skipped step to actually be executed?