Allow extra variables for use with Jinja that are not action parameters.
Open
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
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 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