StackStorm / StackStorm/orquesta
With Items Causing Workflow Tests to Fail When Items are an Empty List
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 111
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
Let's say that you have a workflow:
example_workflow.yaml
version: 1.0
tasks:
start:
action: core.noop
next:
- when: <% succeeded() %>
do:
- with_items_task_example
with_items_task_example: # This shouldn't run
action: core.echo
with:
items: <% [] %>
input:
message: <% item() %>
You can try to write the following workflow test:
workflow_test.yaml
---
workflow: "example_workflow.yaml"
expected_routes: [[]]
inputs: {}
expected_task_sequence:
- start
- with_items_task_example
mock_action_executions: []
expected_workflow_status: succeeded
If we were to test this using the orquesta test, this would fail due to the items from the with items call within the with_items_task_example task. The error would be - ERROR - list assignment index out of range.
I am guessing that orquesta when running the test doesn't properly handle the list. Where as if you were to run this in st2 it would run without a hitch.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the example_workflow.yaml and workflow_test.yaml scenarios in the issue, then run the workflow test using an empty with-items list. Trace the failing list handling that produces "list assignment index out of range"; done means the test completes successfully with the expected task sequence, empty route, and succeeded workflow status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, yaml
- Domain
- devops, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100