What’s This? StackStorm 2.4 Already?

We had said we were planning on releasing StackStorm 2.4 in September. Well, we changed our mind: StackStorm 2.4 has just been released. We wanted to get some of these new features out now, rather than wait. Pack UI, Workflow pause & resume, ChatOps fixes, and more. Read on to see what we’ve done.

Web UI:

Ooh boy, lots of stuff has been happening here. The first feature you’ll see is the new “Packs” tab:

There’s a lot going on here. You can see your installed packs, and available packs. If you select a pack, you can see some information about the pack, and install it.

You can also configure or remove any installed pack:

And check this out:

See how the Jira and Sensu packs above have their version number highlighted? Click on that pack, and you can see your current version and the latest version. It’s a quick and easy way to see which of your installed packs have updates available.

That’s not the only new thing. Click on the History tab, then click on the timestamp next to an entry.

Click on it again. See that?

When you click on the time, it changes between UTC and your local timezone. Nifty, eh?

We’ve also made a few other small fixes and changes, including:

  • Position sorting: Parameters are displayed in the Web UI in this order: Firstly, based upon position value in the action metadata. Then required parameters are displayed in alphabetical order. Finally, any remaining optional parameters are displayed, again in alphabetical order.
  • Arrays can be entered as either JSON or a comma-delimited list.

Workflow Pause & Resume

Mistral and ActionChain workflows can now be paused and resumed. You can run st2 execution pause <execution-id> and st2 execution resume <execution-id> to pause and resume a workflow.

If you pause a workflow, that status flows down to any sub-workflows. You can then resume that individual sub-workflow, which is handy for testing.

This feature lays the groundwork for our upcoming st2.ask feature – see more below.

Configuration Values in Action Metadata

Ever wanted to reference a value from your pack configuration in your action parameters? Now you can. Use the config_context prefix. For example, if your pack configuration contains from_number, you could refer to it in your action metadata like this:

---
...
parameters:
from_number:
type: "string"
description: "Your twilio 'from' number in E.164 format. Example +14151234567."
required: false
position: 0
default: "{{config_context.from_number}}"

ChatOps

ChatOps has also seen some attention with this release. Some of the key points include upgrading Node.js to 6.x and upgrading hubot-slack to 4.3. This fixes multiple issues related to proxies, user highlighting, and improves reliability when Slack gets disconnected.

We’ve also fixed some packaging issues here, which should resolve some issues we saw related to Node.js dependencies. Fewer problems all around in future.

If you’re upgrading, pay attention to the manual steps to upgrade your Node.js version.

Custom Filters Now Available in Mistral Workflows

In previous versions of StackStorm, we provided a number of custom filters to augment what you could do to transform data in your ActionChain workflows. Until version 2.4, these were only available in Jinja snippets rendered within StackStorm, meaning they were not available to Mistral workflows. However, as of 2.4 these have been made available to Mistral workflows as well.

Note also – if you’ve used the st2kv filter to retrieve values from the datastore, that behavior has been modified slightly. It will now no longer attempt to decrypt any encrypted values by default – you must specify this as an optional parameter to that function. Take a look at the upgrade notes for more details.

Miscellaneous Fixes, Changes and Improvements

  • Pack registration will now fail if your pack contains a config.yaml file. This feature was deprecated a while ago, and version 2.3 logged WARNING messages about it. You must migrate to new-style pack configuration. Trust us, it’s worth it.
  • The default version of MongoDB installed on new systems is now v3.4. You can keep using v3.2 on your existing systems, or upgrade. Up to you.
  • When you install a pack via st2 pack install {pack}, it will now tell you how many rules, sensors, and actions it is installing. This gives you a clue that it might take a while if the pack is huge. cough AWS cough.
  • In a related change, we fixed some timeout issues occurring on slower systems when installing large packs. Yes, I’m still looking at you, AWS pack.
  • Specifying arrays of objects when using st2 run is a bit easier now – see #3670.
  • Logrotate configs are now a bit better behaved with stale st2actionrunner log files.
  • Several issues related to the message bus and queue registration have been resolved. Thanks to John Arnold for his help here.

Upgrading

Packages are now available in apt and yum repos. Make sure you backup first, and check the upgrade notes, especially if you’re upgrading from pre-2.2. It’s a good time to update your packs too. Check out the Pack UI to quickly see which installed packs have updates available.

As always, if you run into any problems, get in touch via Slack or GitHub.

What’s Next?

We’re now working on features for 2.5. These include:

  • Streaming API!!! We know, you’ve been asking for this FOREVER. Well, we now have WIP code. If you’re interested in this, please check out PR #3657, and have a read through the comments there.
  • st2.ask – WIP code is here
  • Common pack Python ‘lib’ directory that can be used by both sensors & actions

We’re hoping to ship v2.5 in the next two months.

See you on Slack!