Alias Parameter Transformations
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
Following on from https://github.com/StackStorm/st2/issues/1704 then although immutable alias parameters have simplified and removed the need in many cases for intermediate actions, I still have use-cases where it would be beneficial if the alias parameters could be transformed before they are sent to the action.
At the moment for example if the action takes a dictionary as a parameter, but I am only ever going to send it with the value for one key then I either have to:
-
make the user send in the full dictionary in their alias command
-
write a intermediary action to format the value before sending onto the main action.
This seemed to have been discussed under https://github.com/StackStorm/st2/issues/1704 alongside default parameter values, but as far as I'm aware only default parameter values have been added (with the example of stripping off http).
For example, I currently have simplified aliases for the aws_boto3.boto3_action, and currently the user has to send in a full dictionary for params on their ! command on slack. When really I just need them to specify the value for a single key in that dictionary.
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 reading the linked issue #1704 and the current alias-parameter behavior, including default parameter values. The requested change is to transform or map an alias value into a nested action parameter, such as supplying one key of the boto3_action params dictionary. Done means users can provide the simplified alias value without an intermediary action.
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
- Mostly clear
- Newbie friendliness
- 25/100