January 20, 2015
by Lakshmi Kannan
Sensors can be long running. If sensors are written to poll external sources (for example, we blogged about our Twitter sensor), it would be awesome to store state information in some place to de-dupe already processed events or even save markers (say, timestamps) to know what events have already been processed. Our “dogfooding” experience helped us take a user centric view and with that, we introduced a way for sensors to save state to key value store.
Rules in StackStorm are awesome. They allow you to work on incoming events intelligently. The intelligence comes from smarter criteria that users can apply on parameters in those incoming events. With 0.7, we added a bunch of new criteria operators viz. iequals, contains, icontains, ncontains, incontains, startswith, istartswith, endswith, iendswith etc. Note all of these operators are string operators. We hope to add more in future releases. We’d love your feedback in this area.
Remote actions can be long running. Our users wanted a way to kill actions if they exceeded a certain time. All remote actions now can take a timeout parameter. The timeout can be provided at an individual action level. This provides users with more control on actions and how long they run. Of course, when timeout is breached, StackStorm kills the action and marks it as failed.
With the 0.7 release, we also have a shell runner for local actions. Previously, all local actions were executed via SSH. The reasoning was to avoid more code to maintain. However, this required setting up of SSH keys which is an user level overhead and an extra detail to grok. So we introduced a local shell runner which does not have the aforementioned overhead. The local runner also makes it easier to debug local actions.
Key-value store in StackStorm allows you to save parameters that can be used in rules, actions or action chains. With 0.7, users can now set TTL (time-to-live) for individual keys.
We added a little more flexibility to our authentication story. In what we call ‘standalone’ mode (to indicate that auth is not handled at apache layer), users can write custom auth backend modules that StackStorm can use. This allows for a more flexible auth model when deployments want to use existing identity providers like LDAP.
With 0.7, we took our first stab at tagging content. Tags are key-value pairs that are essentially metadata on content. For now, tags are passive, i.e. we do not do anything interesting with them (yet), but it is only natural that we should. This is something to look out for in the future releases.
We use our system a lot ourselves. We felt the pain when we had to debug rules. We introduced a rule tester that helps with debugging rules. This is super useful as a content author.
Numerous bug fixes went into the release. Please see the changelog for a list of them. One of the major fixes is action validation. Actions registered using st2ctl reload are now validated against the schema for actions. This provides for a way to validate that the actions comply with StackStorm requirements.
We also promoted timers to be run as part of the rules engine. Now you can see logs of timer invocations and rules they invoked in st2 logs for rules engine. This is a major refactor in 0.7. We also refactored a lot of other code and added more tests, so contributing to StackStorm is easier and more fun. We look forward to more community involvement in design and development.
Some fun facts of 0.7 include:
Download our 0.7 release today, and let us know what you think! Share your thoughts and ideas via moc.spuorgelgoognull@mrotskcats, #stackstorm on irc.freenode.net or on Twitter @Stack_Storm, and stay updated on the latest news by signing up for our newsletter!