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
361 stars 13 forks source link

File watching not working when changing `cmd` value in `container` step type #165

Closed cbruno10 closed 7 months ago

cbruno10 commented 11 months ago

If I have the following step type and start my Flowpipe server:

  param "instance_ids" {
    type        = list(string)
    description = "The IDs of the instances."
  }

  step "container" "start_ec2_instances" {
    image = "amazon/aws-cli"
    cmd = concat(
      ["ec2", "start-instances", "--instance-ids"],
      param.instance_ids
    )
    env = {
        AWS_REGION            = param.region
        AWS_ACCESS_KEY_ID     = param.access_key_id
        AWS_SECRET_ACCESS_KEY = param.secret_access_key
    }
  }

And I change --instance-ids to --bad-instance-ids, I'd expect the command to error when run since that's not a valid flag, but instead the pipeline still runs OK.

github-actions[bot] commented 9 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.

graza-io commented 8 months ago

I think this is resolved in the 0.2.0-beta releases.

Updated the cmd in my pipeline step between two runs

❯ go run . pipeline run cs.pipeline.container_source --host local
[flowpipe] Execution ID: exec_cmbru0ci016gi4er8kv0
[container_source] Starting pipeline
[container_source.from_image] Starting container
[container_source.from_image] Complete 202ms
[container_source] Output stdout = hello from image
[container_source] Complete 204ms exec_cmbru0ci016gi4er8kv0
❯ go run . pipeline run cs.pipeline.container_source --host local
[flowpipe] Execution ID: exec_cmbru5si016gi4er8l10
[container_source] Starting pipeline
[container_source.from_image] Starting container
[container_source.from_image] Complete 197ms
[container_source] Output stdout = hello from image 2
[container_source] Complete 198ms exec_cmbru5si016gi4er8l10

Server output:

2024-01-05T08:33:54Z [flowpipe] server started
2024-01-05T08:33:54Z [flowpipe] server listening on localhost:7103
2024-01-05T08:33:54Z [mod] loaded mod mod.cs
2024-01-05T08:34:09Z [pipeline] [cs.pipeline.container_source.exec_cmbru0ci016gi4er8kv0] pipeline queued
2024-01-05T08:34:09Z [pipeline] [cs.pipeline.container_source.exec_cmbru0ci016gi4er8kv0] pipeline started
2024-01-05T08:34:09Z [pipeline] [cs.pipeline.container_source.exec_cmbru0ci016gi4er8kv0] pipeline finished
2024-01-05T08:34:23Z [mod] reloaded mod mod.cs
2024-01-05T08:34:23Z [mod] cached pipelines and triggers
2024-01-05T08:34:23Z [mod] rescheduled triggers
2024-01-05T08:34:31Z [pipeline] [cs.pipeline.container_source.exec_cmbru5si016gi4er8l10] pipeline queued
2024-01-05T08:34:31Z [pipeline] [cs.pipeline.container_source.exec_cmbru5si016gi4er8l10] pipeline started
2024-01-05T08:34:32Z [pipeline] [cs.pipeline.container_source.exec_cmbru5si016gi4er8l10] pipeline finished

@cbruno10 - can you retest and let me know if you're still having issues?

graza-io commented 7 months ago

Haven't been able to replicate issue for a while now, will close issue - feel free to reopen/open a new issue if you encounter any issues.