Skip to content

DAB syntax for for_each task inputs is cumbersome #2370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ianepreston opened this issue Feb 24, 2025 · 1 comment
Open

DAB syntax for for_each task inputs is cumbersome #2370

ianepreston opened this issue Feb 24, 2025 · 1 comment
Labels
DABs DABs related issues Enhancement New feature or request

Comments

@ianepreston
Copy link

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 ianepreston added the DABs DABs related issues label Feb 24, 2025
@andrewnester andrewnester added the Enhancement New feature or request label Feb 24, 2025
@C0dingMast3r
Copy link

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"
                        }
                      ]'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DABs DABs related issues Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants