StackStorm / StackStorm/st2

Feature request - support pack actions returning object instances and/or iterable collections of instances

Open
#2,968 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently, a pack action can return simple types like string, int, tuple, but not object instances. Since 'most' Python libraries return classes, st2 currently put's them in a string.

Proposing that it attempts to use __dict__ of a class instance instead of __str__

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

Start by locating the pack action result-handling entry point and the code that currently serializes simple return types with str. Trace how object instances and iterable collections are handled, then define tests and expected output for dict-based serialization before implementing the feature.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.