StackStorm / StackStorm/st2

Changing nested "result" attribute in action reporting

Open
#3,342 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In building a custom response for an action alias, I realized that actions report their results via a nested set of result keys:

vagrant@st2vagrant:/opt/stackstorm/packs/napalm$ st2 run napalm.check_consistency hostname=vsrx01
.
id: 58e7f09cc4da5f5bc3963835
status: succeeded
parameters:
  hostname: vsrx01
result:
  exit_code: 0
  result: null
  stderr: ''
  stdout: ''

So, in my alias response, I had to use execution.result.result to refer to values returned by the action.

I'm fully acknowledging that I expect that the ratio of value to effort for changing this is probably skewed towards the "not worth it" direction, but figured I'd open the issue anyways to see if it's even worth the discussion. Value:effort aside, it would be nice if the inner attribute was named values or something else, other than result. execution.result.values would definitely look a bit better.

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

No file, test, or entry point is named in the issue. Start by tracing the action-alias response and action-result reporting paths that produce execution.result.result, then determine whether renaming the inner field affects consumers. Done means the naming and compatibility scope are agreed and the relevant reporting behavior is updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.