New feature in Juju 2.8: Improved actions experience

Actions provide the ability for charm authors to specify operational tasks that should be able to be run time to time.

In Juju 2.8, a re-design of actions is now available. The major changes are:

  • Terminology has been changed. Actions are now composed of “tasks” and “operations”. Actions spawn an operation per application and operations spawn a task per unit.
  • Running an action defaults to waiting for the output before returning. This synchronous behaviour allows actions to be easily be included in command-line pipelines. Previously you were required to use juju show-action-output by default.
  • Running actions can now be cancelled.
  • Charm authors now have the ability to send progress reports (“progress log messages”) to Juju administrators
  • Plain text output is now excludes YAML boilerplate. This is intended to make it easier to compose command-line pipelines with actions.
  • STDOUT and STDERR are both included in output
  • Action identifiers are now numeric integers instead of UUIDs
  • The ability to list pending, running, completed actions has been added
  • The ability to watch progress of a running action has been added

These points are elaborated on in this post: