Exit with-items loop on error

Registered by Winson Chan

Provide an option when using with-items and concurrency to exit loop if one or more action execution has erred.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Winson Chan
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

I need this feature for some workflows I'm working on that assembles a storage cluster. Adding nodes into the cluster out of order is what we are trying to avoid. For example, if node 2 fails to be added, then nodes 3+ should not be added.

An example workflow, dealing with files

---
version: '2.0'

example_items:
  description: run a with-items a bad item

  tasks:
    create_files:
      action: core.local
      with-items: filename in ["/tmp/file1.txt", "/ typo/bad_directory.txt", "/tmp/file3.txt"]
      concurrency: 1
      input:
        cmd: "printf \"$(date): doing a step \n\" >> <% $.filename %>"

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.