GithubHelp home page GithubHelp logo

Comments (2)

Mierdin avatar Mierdin commented on June 11, 2024

๐Ÿ‘ , and for future readers, it looks like this is enforced by the JSON schema embedded in the KeyValue API models https://github.com/StackStorm/st2/blob/master/st2common/st2common/models/api/keyvalue.py#L61

from st2docs.

cognifloyd avatar cognifloyd commented on June 11, 2024

I just found this docs reference that describes why the datastore is limited to strings. This needs to be linked to from the datastore doc/section at least.
https://docs.stackstorm.com/latest/reference/pack_configs.html#dynamic-config-values

Dynamic config values
Right now only string type is supported for dynamic config values (config items whoโ€™s value is retrieved from the datastore). This was done intentionally to keep the feature simple and fully compatible with the existing datastore operations (this means you can re-use the same API, CLI commands, etc.).

To work-around this (in case you want to use a non-string value) you can, for example, store a JSON serialized version of the your value in the datastore and then de-serialize it in the action / sensor code.

If this turns out to be a big problem for many users, we might consider introducing support for arbitrary types, but this would most likely mean we will need to implement a new API and CLI commands for managing dynamic config values and thatโ€™s something we want to avoid.

from st2docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.