StackStorm / StackStorm/st2

NoneType object has no attribute runner

Open
#5,720 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

SUMMARY

Receiving a "'NoneType' object has no attribute 'runner'" error on some step executions.

STACKSTORM VERSION

3.6

OS, environment, install method

Running stackstorm on azure k8s with the provided helm charts.

Steps to reproduce the problem

A minimal yaml definition that we've seen this error from is below:

`
version: 1.0

description: A basic workflow that demonstrates inquiry.

input:

  • task_name
  • args
  • kwargs
  • options
  • timeout
  • retries

tasks:
start:
action: core.noop
next:
- when: <% succeeded() %>
do: execute_task

execute_task:
action: shigo.task
input:
task_name: <% ctx(task_name) %>
args: <% ctx(args) %>
kwargs: <% ctx(kwargs) %>
options: <% ctx(options) %>
timeout: <% ctx(timeout) %>
next:
- when: <% failed() and ctx(retries) > 0 %>
do: execute_task
publish:
- retries: <% ctx(retries) - 1 %>
- when: <% failed() and ctx(retries) <= 0 %>
do: wait

wait:
action: core.ask
input:
ttl: 0
schema:
type: object
properties:
options:
type: string
enum:
- "Retry the failed task"
- "Mark current task as failed"
description: "Options"
required: True
next:
- when: <% succeeded() and result().response.options = "Retry the failed task" %>
do: execute_task
- when: <% succeeded() and result().response.options = "Mark current task as failed" %>
do: failed

failed:
action: core.echo
input:
message: "ending workflow after execute task failed"
next:
- do: fail

output:

  • task_result: <% task(execute_task).result.result %>
    `

Expected Results

Workflow success

Actual Results

"result": {"error": "'NoneType' object has no attribute 'runner'", "traceback": " File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2actions/container/base.py", line 248, in _do_resume\n (status, result, context) = runner.resume()\n File "/opt/stackstorm/st2/lib/python3.6/site-packages/orquesta_runner/orquesta_runner.py", line 210, in resume\n if self.task_resumeable(child_ex):\n File "/opt/stackstorm/st2/lib/python3.6/site-packages/orquesta_runner/orquesta_runner.py", line 197, in task_resumeable\n ac_ex.runner["name"] in ac_const.WORKFLOW_RUNNER_TYPES\n"}

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the minimal workflow from the issue on StackStorm 3.6, then start with st2actions/container/base.py in _do_resume and the reported orquesta_runner.py resume/task_resumeable path. Trace why the child execution has no runner during resume; done means the workflow completes successfully without the NoneType error and the regression is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.