turbot / flowpipe

Flowpipe is a cloud scripting engine. Automation and workflow to connect your clouds to the people, systems and data that matters.
https://flowpipe.io
GNU Affero General Public License v3.0
385 stars 16 forks source link

Should steps that depend on a skipped step be executed? #828

Closed e-gineer closed 5 months ago

e-gineer commented 8 months ago

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?

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 5 months ago

This issue was closed because it has been stalled for 90 days with no activity.