Skip to content

Cannot re-run orquesta workflow with --task on a with items task that has succeeded #5016

@amanda11

Description

@amanda11

SUMMARY

If I have an orquesta workflow with a with items task, then I cannot use execution re-run and name the with-items task in the --task field if all of those tasks have passed. If I use a task that isn't a with items task, then the re-run works fine.
The documentation for orquesta refers to re-runs with with-items, and there is a unit-test in orquesta repo for it - https://github.com/StackStorm/orquesta/blob/master/orquesta/tests/unit/conducting/test_workflow_conductor_with_items_pause_and_resume.py.
However if I attempt to re-run using the st2 execution re-run command then I get a failure.

result: 
  errors:
  - message: '''NoneType'' object has no attribute ''get'''
  output: null

STACKSTORM VERSION

st2 3.3dev (397e2f7), on Python 2.7.5

OS, environment, install method

CentOS7 standalone. One line install of 3.3.0, and upgrade to 3.3dev

Steps to reproduce the problem

  1. Create orquesta workflow with a simple task and a with items task,e .g.
version: 1.0

vars:
  - xs:
      - fee
      - fi
      - fo
      - fum
tasks:
  task1:
    with: <% ctx(xs) %>
    action: core.echo message=<% item() %>
    next:
      - when: <% succeeded() %>
        do: task2
  task2:
    action: core.noop
  1. In the UI run that workflow

  2. re-run the execution using --task task2 -> result re-run is fine

  3. re-run the execution using --task task1 -> get error indicating '''NoneType'' object has no attribute ''get'''

Expected Results

To be able to re-run the with-items task.

Actual Results

[centos@centos-7-test actions]$ st2 execution re-run 5f2d76d82efa012f1f6f603f --task task2
.
id: 5f2d76f02efa012f1f6f6042
action.ref: examples.amanda
parameters: None
status: succeeded
start_timestamp: Fri, 07 Aug 2020 15:44:48 UTC
end_timestamp: Fri, 07 Aug 2020 15:44:49 UTC
result: 
  output: null
+--------------------------+------------------------+-------+-----------+-----------------+
| id                       | status                 | task  | action    | start_timestamp |
+--------------------------+------------------------+-------+-----------+-----------------+
| 5f2d76f179debc2e8dac24b4 | succeeded (0s elapsed) | task2 | core.noop | Fri, 07 Aug     |
|                          |                        |       |           | 2020 15:44:49   |
|                          |                        |       |           | UTC             |
+--------------------------+------------------------+-------+-----------+-----------------+
[centos@centos-7-test actions]$ st2 execution re-run 5f2d76d82efa012f1f6f603f --task task1
.
id: 5f2d76f42efa012f1f6f6044
action.ref: examples.amanda
parameters: None
status: failed
start_timestamp: Fri, 07 Aug 2020 15:44:52 UTC
end_timestamp: Fri, 07 Aug 2020 15:44:53 UTC
result: 
  errors:
  - message: '''NoneType'' object has no attribute ''get'''
  output: null

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions