st2 icon indicating copy to clipboard operation
st2 copied to clipboard

NoneType object has no attribute runner

Open AlexChung1995 opened this issue 3 years ago • 1 comments

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!

AlexChung1995 avatar Sep 01 '22 23:09 AlexChung1995

Unfortunately more information would be needed on the scenario to help debug.

When it fails what action was being run? And what route through the workflow had it taken? When it fails, is in a particular chain through the workflow that causes it to fail? e.g. what value was retries, what was chosen as the inquiry response, what step in the workflow was it at when it failed? Can you reproduce the problem consistently? e.g. each time through if you go through particular route it fails? Can you reproduce problem with using default packs, e.g. without the shigo pack?

I tried to reproduce problem on 3.7.0 replacing the shigo.task with a simple core.local, and went through a few different scenarios through the workflow and didn't see any problem.

amanda11 avatar Sep 08 '22 14:09 amanda11