Feature request - support pack actions returning object instances and/or iterable collections of instances
Open
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
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 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