Feature request - Parameter property to bypass any extra processing of the value
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
SUMMARY
Sometimes it's required to pass data to an action as is, with no processing from st2 whatsoever. Currently, Stackstorm seems to be passes data thru jinja2 renderer, causing (and sometimes even breaking) undesirable transformation of the values.
For example, if a string contains {{.XYZ}} combination of characters, it's just impossible to pass such string to an action without prior modification. Sometimes it's not doable as data can be large and complex, produced by other actions. It is also applicable to data passed as object, e.g. {"data": "{{.XYZ}}"}
$ st2 run core.local cmd="echo {{.blah}}"
ERROR: 500 Server Error: Internal Server Error
MESSAGE: unexpected '.' for url: https://l...
So, this is a request to add another property to parameters (we already have properties like secret, required, etc), which would disable any extra processing from the stackstorm side and just take the value as is.
ISSUE TYPE
- Feature Idea
STACKSTORM VERSION
Paste the output of st2 --version:
st2 2.10.3, on Python 2.7.10
OS / ENVIRONMENT / INSTALL METHOD
CentOS 6. Custom install from one-liner :)
STEPS TO REPRODUCE
$ st2 run core.local cmd="echo \"{{.blah}}\""
ERROR: 500 Server Error: Internal Server Error
MESSAGE: unexpected '.' for url: https://l...
EXPECTED RESULTS
If cmd parameter had the proposed property set to true, we'd see:
$ st2 run core.local cmd="echo \"{{.blah}}\""
.
id: 5c88789e7afb5b004209d064
status: succeeded
parameters:
cmd: echo "{{.blah}}"
result:
failed: false
return_code: 0
stderr: ''
stdout: '{{.blah}}'
succeeded: true
ACTUAL RESULTS
$ st2 run core.local cmd="echo \"{{.blah}}\""
ERROR: 500 Server Error: Internal Server Error
MESSAGE: unexpected '.' for url: https://l...
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 with the provided st2 run core.local reproduction using a value containing {{.blah}}, and compare the current error with the expected unchanged parameter and successful action result. Trace where action parameters are processed to determine the scope of a property that bypasses processing; done means the value is passed through unchanged without breaking existing parameter behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100