CHIMEFRB / workflow

🌊 Working in flowstate.
0 stars 0 forks source link

[BUG] `execute` function parses all output using `ast.literal_eval` #71

Closed odarotto closed 2 months ago

odarotto commented 2 months ago

When creating a pipeline config like:

version: "2"
name: files-test
defaults:
  user: "test"
  site: "local" # (1)
  tags: ["tag1"]

pipeline:
  steps:
    - name: create-file
      stage: 1
      work:
        command: ["touch", "test.py"]
    - name: write-file
      stage: 2
      work:
        command: ["echo", "import os > test.py"]
    - name: write-file-2
      stage: 3
      work:
        command: ["echo", "print(os.environ) >> test.py"]
    - name: run-file
      stage: 4
      work:
        command: ["python", "test.py"]
    - name: finish
      stage: 4
      work:
        command: ["echo", "Finished"]

Steps write-file and write-file-2 will fail due to:

image

shinybrar commented 2 months ago

This issue has been release #75 . Now any CLI has the following default outputs,

work.results = {
    "args": process.args,
    "stdout": stdout,
    "stderr": stderr,
    "returncode": process.returncode,
}