StackStorm / StackStorm/st2

Python runner should throw an exception when action result can't be serialized

Open
#3,541 1 comment 0 reactions 1 assignee View on GitHub

@Kami is already working on this.

Since Jun 30, 2017.

breaking change complexity:medium enhancement feature
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

Right now if the result can't be serialized we return str() version of the result, but I believe the right approach would be to throw an exception in such scenario.

str() version of the result is usually of little use and not being able to de-serialize the result usually indicates a programmer error (action / pack developer didn't correctly implement de-serialization of the result in format which can be consumed in StackStorm).

If people strongly believe there still is some value in str() version of the result we can add allow_non_serializable_results Python runner config option which should default to false.

For details, see: #3489, #3540.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.