cli icon indicating copy to clipboard operation
cli copied to clipboard

DAB syntax for for_each task inputs is cumbersome

Open ianepreston opened this issue 1 year ago • 1 comments

Describe the issue

The syntax for an array of inputs to a for_each task in DABs is a string formatted to be escaped into a json array rather than a native yaml array

Configuration

This is just a syntax challenge, so I'll just focus on the components that make this annoying for our use case

resources:
  jobs:
    tasks:
       - task_key: "many_inputs_task"
          for_each_task:
            inputs: "[\"input_1\",\"input_2\",\"input_n\"]"

Steps to reproduce the behavior

N/A

Expected Behavior

It would be nice to use yaml arrays to supply multiple inputs:

resources:
  jobs:
    tasks:
       - task_key: "many_inputs_task"
          for_each_task:
            inputs:
              - "input_1"
              - "input_2"
              - "input_n"

Actual Behavior

DABs doesn't accept that syntax or a few other variations we tried

Is this a regression?

No

Debug Logs

NA

ianepreston avatar Feb 24 '25 15:02 ianepreston

There is a slightly different way to do it that is cleaner. @ianepreston

Here is how I put inputs:

inputs: '[
                      {
                        "input1":"76",
                        "input1.1":"value"
                        },
                        {
                        "input2":"apple",
                        "input2.2":"valu123"
                        }
                      ]'

C0dingMast3r avatar Apr 10 '25 22:04 C0dingMast3r

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

github-actions[bot] avatar Jun 10 '25 00:06 github-actions[bot]

I still am interested in this issue.

ianepreston avatar Jun 10 '25 01:06 ianepreston

I am also interested in this issue.

gmteunisse avatar Jul 15 '25 16:07 gmteunisse

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

github-actions[bot] avatar Sep 15 '25 00:09 github-actions[bot]