StackStorm / StackStorm/st2

Allow extra variables for use with Jinja that are not action parameters.

Open
#2,945 1 comment 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

Sometimes you want to do things like st2 run REQ_FILE="/foo/rqmnts.txt" PIP_OPTIONS="-u" core.local cmd="pip install {{PIP_OPTIONS}} -r {{REQ_FILE}}"

or think @emptywee's use case:

I have an action that will list something, some items I want users to be able to limit the list to show only those that match some string (edited).
I know I can create an action that will do it somehow but with jinja I think I'd have easily made a {% for ..%} loop and showed only those that match the query.

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 tracing how st2 run handles action parameters and how Jinja expressions are rendered. Clarify how extra variables such as REQ_FILE and PIP_OPTIONS should be supplied, scoped, and validated, then define tests covering the command example and the filtering use case. Done means documented behavior and passing coverage for the agreed interface.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.