Skip to content

Iteration doesnt work when there is one item in the listΒ #462

@anushapai23

Description

@anushapai23

What happened:
Iteration does not work as expected when there is one item in the list.

How to reproduce it:
This is the portion of the workflow-

do:
- initialize:
    do:
    - resolveDefaultEnvironment:
        call: resolve-environment:1.0.0@default
        with:
          param1: ${ abc }
        export:
          as: '$workflow.input + { var: . }'
    - iterateOnPackage:
        for:
          each: environment
          in: $workflow.input.packages
        do:
        - setTest:
            set:
              test: value
            export:
              as: $context + .

It does not iterate when there is single element as shown below:

packages:
- ABC

Does run well with :

packages:
- ABC
- DEF

Metadata

Metadata

Assignees

Labels

app: runnerConcerns the Runnerpriority: highIndicates a high priority issuetype: bugSomething isn't workingweight: 2An issue with a low development impact

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions