StackStorm / StackStorm/st2

Pack level Scope for KV pairs

Open
#4,955 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Feature Request:
I see that we have system/all and user scopes, but no pack level scope. So I am requesting the pack level scope for storing KV pairs.
With this, the KV pairs which are set within the pack are accessible only within the pack and no where else. Also, it would be great to have an option which can take the pack name as input and set the KV to be accessible with in the that pack.

I tried using the local keyword param on sensor_service.set_value and action_service.set_value, which controls the namespace of the KV pair that is being set on the KV store. But local includes both the pack name and class name as prefix for the key and so, setting a KV pair from within one action and reading from another set of action is not possible.

Let me know if you have any questions. Thank you.

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

Start by tracing sensor_service.set_value and action_service.set_value, especially how the local keyword builds KV namespaces. Define how a pack-level scope should be selected and shared across actions in the same pack, then verify that pack-scoped values remain inaccessible outside that pack.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.