StackStorm / StackStorm/st2

Provide support for passing "=" in a string

Open
#6,160 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

alias yaml
`---
name: "launch_quasar"
action_ref: "quasar.quasar1"
description: "launch a quasar execution"
formats:

  • display: " "
    representation:
    • "{{ command }} {{ payload }}"
      result:
      format: |
      {{ execution.result.result }}
      `
      action yaml

name: quasar1
description: Action that takes an input parameter
runner_type: 'python-script'
entry_point: 'quasar1.py'
enabled: true
parameters:
command:
type: string
description: 'Input parameter'
required: true
payload:
type: string
description: 'Input parameter'
required: true
user:
type: "string"
description: "Slack user who triggered the action"
required: false
default: "{{action_context.api_user}}"

Representation used: "{{ command }} {{ payload }}"
Parameter defintion:
payload:
type: string
description: 'Input parameter'
required: true

We have an usecase where we need to pass a string with "=" in it for payload for some reason stackstorm is not allowing me to do that, if i pass such value it is not taking it as a seperate string and causing multiple issues

Issue is not oberved if we are putting ":" instead of "=" and also putting a space after "=" solves the issue

Have tried different things (using jinja template replace option and replaced "=" with "= " but i am getting internal server error.
if i am able to pass the yaml validation, i can have my own validation in action py file but the issue the execution is not even going to the python file.

basically this should be accepted by stackstorm quasar create cluster_name=weekly_nats

Screenshot 2024-03-04 at 11 35 28 AM

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

Reproduce the reported case with quasar create cluster_name=weekly_nats, comparing it with the working colon and spaced-equals cases. Start by tracing how the representation {{ command }} {{ payload }} and the payload parameter are parsed before the quasar1.py action entry point is reached. Done means an equals-containing payload is accepted and reaches the action without an internal server error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.