StackStorm / StackStorm/orquesta
decrypt_kv jinja filter fails if the key isn't in the kv store
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 111
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
An action file that has a secret parameter with a default value as follows:
action_param:
type: string
description: "This will fail the action"
default: "{{ st2kv.system.test_param | decrypt_kv }}"
secret: true
will fail with the following message if 'test_param' is not in the kv store:
ERROR: 400 Client Error: Bad Request
MESSAGE: Failed to render parameter "test_param": Referenced datastore item "st2kv.system.test_param" doesn't exist or it contains an empty string
Alternatively, if I pass a value that doesn't exist in the kv store but I don't try to decrypt it, then a blank string gets passed into the action parameter. I would expect an encrypted value to pass a blank string as well instead of failing.
Contributor guide
No contributing guide indexed for this repository
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
Locate the decrypt_kv Jinja filter and the parameter-rendering path that handles missing datastore values. Reproduce the action parameter case described in the issue, then add coverage for a missing key and confirm that the encrypted form passes an empty string instead of failing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100