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
383 stars 16 forks source link

Pipeline not ending correctly #542

Closed graza-io closed 10 months ago

graza-io commented 10 months ago

Under certain circumstances when primitives fail the following code in internal/es/command/step_start.go is hit, returns true and then the process hangs:

shouldReturn := specialStepHandler(ctx, stepDefn, cmd, h)
  if shouldReturn {
    return
  }
graza-io commented 10 months ago

Minimal Reproduction

mod "input" {
  title = "Input Test"
}

variable "slack_token" {
  type        = string
  description = "Slack Token"
  default = "xoxp-69<SNIPPED>"
}

integration "slack" "my_slack_app" {
  token = var.slack_token
}

pipeline "test" {
  step "transform" "initial_step" {
    value = "Awaiting Input..."
  }

  step "input" "get_value" {
    type   = "button"
    prompt = "Pick One"
    options = ["Hello","Goodbye","What?"]
    notify {
      integration = integration.slack.my_slack_app
      channel     = "#general"
    }
  }

  step "transform" "finish_step" {
    value = step.input.get_value.value
  }

  output "selected_input" {
    value = step.transform.finish_step.value
  }
}
graza-io commented 10 months ago

Fixed in https://github.com/turbot/flowpipe/commit/fec2902ae639361fc8d0a8ba82e8be6fa981b428