View Source Changelog

Master

Changes

21.2.0

Changes

  • Move run initialization from Altworx to Runbox (PR, #5968)

21.1.2

Changes

  • Fix few types in Output Actions (PR, #7245)

21.1.1

Changes

  • Fix scenario manifest types (PR, #7245)

21.1.0

Changes

  • Limit number of concurrent ports/sockets in peer nodes (PR, #7201)

21.0.0

Warnings

  • Notification templates can no longer access the primary actor (primary asset or incident) via the primary_asset variable. Instead, it is now available via the primary_actor variable which is a map with the following structure:
    %{
      "entity_type" => "asset" | "incident",
      "type" => "asset or incident type",
      "id" => "asset or incident ID"
    }
    For example: %{"entity_type" => "asset", "type" => "/assets/camera", "id" => "cam12"}.
  • User action signing changed. Tests still use the same key so user actions in tests will not change. However, in production, there may be some additional necessary decisions and steps. See Altworx changelog for more information.
  • If you generate user actions in tests outside of Sandbox (e.g. module unit tests), you need to configure the signer. It is recommended to use the Sandbox signer which uses a fixed legacy key. The signer can be configured via application env as follows.
    # config/test.exs
    config :runbox, :user_action_signer, {Node.self(), Runbox.Runtime.Sandbox.UserActionSigner, :sign}
  • Note the function Runbox.Scenario.UserAction.fire/1 was moved into Altworx. If you need to verify and unpack user actions in tests use Runbox.Runtime.Sandbox.UserActionSigner.validate_and_unpack/1.

Changes

  • Document the change of primary_asset variable to primary_actor in notification templates (PR, #7166)
  • Move signing user actions into Altworx (PR, #7217)

20.0.0

Warnings

  • Notification templates now receive assets from AQLs with separate asset type and ID and use a different struct.
    # Old
    %{
      "asset" => [
        %AssetMap.DAO.Entity.Asset{
          id: "/assets/server_room/Z10",
          attributes: %{"name" => "022-000033/AGPP"}
        }
      ]
    }
    
    # New
    %{
      "asset" => [
        %AssetMap.Ecto.Model.Asset{
          type: "/assets/server_room",
          id: "Z10",
          attributes: %{"name" => "022-000033/AGPP"}
        }
      ]
    }

Changes

  • Document changes in the shape of AQL results passed to notification templates

19.0.0

Warnings

  • Notification output action has changed, particularly ids and primary_asset was replaced with actors and primary_actor. See Runbox.Scenario.OutputAction.Notification for details.
  • Module Runbox.Scenario.UIAction was removed. It was a legacy module that should not have been used for quite some time. In case your scenarios use it, migrate the uses to Runbox.Scenario.UserAction.pack/3 which provides the same functionality, only without the needless wrapper.

Changes

  • Separate asset/incident ID in Notification OAs (PR, #7167)
  • Support access tags in user actions (PR, #6003)

18.0.0

Warnings

  • Scenarios, usually notification templates, using function Runbox.Notifications.TemplateHelper.asset_link need to be updated.
    • The parameters are now split asset type and id.
    • The function doesn't take incidents anymore, use incident_link.
    • The function doesn't support old UI, but that shouldn't be needed anymore.
  • Scenario need to remove :groups from their manifest. It is not used anymore.

Changes

  • Add more details to the Runbox.Scenario.OutputAction.Notification documentation (PR, #7110)
  • Separate asset ID in TemplateHelper.asset_link function (PR, #7165)
  • Remove groups from scenario manifest (PR, #7109)

17.2.0

Changes

  • Make not trimmed access tags invalid (PR, #7148)

17.1.0

Changes

  • Add API for listing template files (PR, #6841)

17.0.1

Changes

  • Validate the type of actor fields inside the Incident OA (PR)
  • Fix docs for direct_subscriptions in the Notification OA (PR)
  • Fix a bug in Simple runtime which caused timeouts sometimes not being saved into a savepoint (PR, #7132)

17.0.0

Changes

  • Add access_tags to delete Scenario.OutputActions (PR, #7088)

16.2.0

Changes

  • Adjust links to UI Network and add new utilities to generate such links (PR, UI#134)

16.1.0

Changes

  • Enable to override default email notification templates (PR, #6840)

16.0.0

Changes

  • scenario: Let user specify emails to reply to (PR, #7024)

15.0.0

Changes

  • Add access_tags to Scenario.OutputActions (PR, #6937)

14.1.0

Warnings

  • Naming convention for manifest modules are no longer mandatory but the module now needs to explicitly implement the Runbox.Scenario.Manifest behavior (use Runbox.Scenario.Manifest) to be recognized as valid

Changes

  • Remove naming requirementes for manifest modules (PR, #6750)

  • Generate id using UUIDv4 instead of UUIDv1 (PR, #6847)

14.0.1

Changes

  • Unplanned Incident future can specify nil timestamp. (PR, #6866)

14.0.0

Warnings

  • Function Runbox.Runtime.OutputAction.is_oa_body? was renamed to Runbox.Runtime.OutputAction.oa_body?.

Changes

  • Upgrade Elixir to 1.18.1 and OTP to 27.2 (PR, #6782)

13.0.3

Changes

  • Fix logger configuration for Slave VMs (PR, #6789)

13.0.2

Changes

  • add partition to Runbox.Message origin (PR, #6832)

13.0.1

Changes

  • Add Sandbox for Simple runtime and generic Sandbox module (PR, #6774)

13.0.0

Warnings

  • The Toolbox structs have been finally renamed to their proper names. You have to rename them in your scenario code, normalizers, and config.ini as well. Occurrences in scenario savepoints will be renamed automatically. The list of the renamed structs is the following:

Changes

12.1.0

Warnings

Changes

  • Fix timeout execution order in Simple scenario (PR)
  • Make Timezip more deterministic: messages in the same timestamp are produced in the topology order (PR)
  • Add StageBased scenario single-process emulator (PR, #6759)

12.0.0

Warnings

Changes

  • Add support for timeouts in the Simple scenario runtime (PR, #6695)

11.0.1

Changes

  • Decrease timeout for starting peer nodes to 15 seconds (PR)

11.0.0

Changes

  • Add documentation for asset types and IDs (PR)
  • Add Simple scenario runtime (PR, #6694)
  • Add incident actors to Event Output Action (PR, #6591)

10.0.0

Changes

  • Update the Livebook example (PR)
  • Require unit ID to be explicitly set when creating the Unit struct (PR, #6609)
  • Improve the documentation (PR, #6195)
  • Use peer instead of deprecated slave module for scenario's nodes (PR, #5918)

9.0.0

Warnings

  • Notifications specifications are no longer retrieved from spec.exs file but are now part of Manifest, all scenarios should now define their notifications specifications directly in scenario manifest.

Changes

8.0.0

Changes

  • Add additional event parameters to Incident History OA (PR, #6592)

7.0.1

Changes

  • Anticipate errors from scenario manifest (PR, #6312)
  • Explicitly propagate altworx root dir to slave (PR, #6331)

7.0.0

Warnings

Changes

  • Forbid slashes in IDs contained in asset/incident creation OAs (PR, #6327)
  • Build scenarios with Elixir 1.15 and OTP 26 (to be compatible with Altworx 24.3) (PR, #6285)

6.0.0

Breaking Changes

  • All output actions have changed. The following snippet shows how should be the output actions updated from the old format to the new one.

    alias Runbox.Scenario.OutputAction, as: OA
    
    # Create Asset
    # old
    OA.new_create_asset_action("/asset/camera/1", 1, %{"a" => 1})
    # new
    %OA.UpsertAssetAttributes{type: "/asset/camera", id: "1", attributes: %{"a" => 1}}
    
    # Update Asset
    # old - deletes and updates attributes via a single action
    OA.new_update_asset_action("/asset/camera/1", 1, %{"a" => 1}, %{"b" => true})
    # new - one action for delete, another one for upsert
    %OA.DeleteAssetAttributes{type: "/asset/camera", id: "1", attributes: %{"b" => true}}
    %OA.UpsertAssetAttributes{type: "/asset/camera", id: "1", attributes: %{"a" => 1}}
    
    # Upsert Asset
    # old
    OA.new_upsert_asset_action("/asset/camera/1", 1, %{"a" => 1})
    # new
    %OA.UpsertAssetAttributes{type: "/asset/camera", id: "1", attributes: %{"a" => 1}}
    
    # Delete Asset
    # old
    OA.new_delete_asset_action("/asset/camera/1", 1)
    # new
    %OA.DeleteAllAssetAttributes{type: "/asset/camera", id: "1"}
    
    # Create Edge
    # old
    OA.new_create_edge_action(1, "/asset/camera/1", "/asset/room/A", "observes")
    # new
    %OA.UpsertEdge{
      from_type: "/asset/camera",
      from_id: "1",
      to_type: "/asset/room",
      to_id: "A",
      type: "observes"
    }
    
    # Upsert Edge
    # old
    OA.new_upsert_edge_action(1, "/asset/camera/1", "/asset/room/A", "observes")
    # new
    %OA.UpsertEdge{
      from_type: "/asset/camera",
      from_id: "1",
      to_type: "/asset/room",
      to_id: "A",
      type: "observes"
    }
    
    # Delete Edge
    # old
    OA.new_delete_edge_action(1, "/asset/camera/1", "/asset/room/A", "observes")
    # new
    %OA.DeleteEdge{
      from_type: "/asset/camera",
      from_id: "1",
      to_type: "/asset/room",
      to_id: "A",
      type: "observes"
    }
    
    # Notification
    # old
    OA.new_notification_action(1, %{type: "created_incident", data: %{"a" => 1}})
    # new
    %OA.Notification{type: "created_incident", data: %{"a" => 1}}
    
    # Event
    # old
    OA.new_event_action(1, %{
      type: "event_type",
      template: "${actors.wagon}",
      actors: %{"wagon" => %{asset_type: "/assets/wagon", asset_id: "123"}}
    })
    # new
    %OA.Event{
      type: "event_type",
      template: "${actors.wagon}",
      actors: %{"wagon" => %{asset_type: "/assets/wagon", asset_id: "123"}}
    }
    
    # Execute SQL
    # old
    OA.execute_sql_action(1, %{
      db_connection: db_connection,
      sql_query: "SELECT 1",
      data: [],
      type: :postgresql
    })
    # new
    %OA.ExecuteSQL{
      db_connection: db_connection,
      sql_query: "SELECT 1",
      data: [],
      type: :postgresql
    }
    
    # Create Incident
    # old
    OA.new_create_incident_action(1, %OA.Incident{
      type: "type",
      id: "id",
      subject: "subject",
      status: "status",
      resolved: false,
      severity: 1,
      future: [],
      history: [%OA.IncidentHistory{
        status: "status",
        severity: 1,
        timestamp: 1,
        description: "description"
      }]
    })
    # new
    %OA.Incident{
      type: "type",
      id: "id",
      subject: "subject",
      status: "status",
      resolved: false,
      severity: 1,
      future: [],
      history: [%OA.IncidentHistory{
        status: "status",
        severity: 1,
        timestamp: 1,
        description: "description"
      }]
    }
    
    # Update Incident
    # old
    OA.new_update_incident_action(1, %OA.IncidentPatch{
      type: "type,
      id: "id",
      severity: 2
    })
    # new
    %OA.IncidentPatch{
      type: "type,
      id: "id",
      severity: 2
    }

    Refer to the documentation in Runbox.Scenario.OutputAction for details.

    There is also a helper Runbox.Scenario.Asset.split_id/1. It splits the full asset ID to asset type and asset ID.

  • The sandbox tests have changed the format of the produced output action. Previously it was a struct

    %Runbox.Scenario.OutputAction{
      type: type,
      timestamp: ts,
      body: body
    }

    Now the :type is gone and :body always contains a struct with the output action parameters, e.g.

    %Runbox.Scenario.OutputAction{
      timestamp: ts,
      body: %Runbox.Scenario.OutputAction.UpsertAssetAttributes{type: type, id: id, attributes: attrs}
    }

Changes

  • New output actions for asset and edge. (PR, #6129)
  • Rework of output action creation and handling. (PR, #6177)

5.0.0

Changes

  • Remove deprecation for '/incident' type. (PR, #5999)

Breaking changes

  • Removed code which separated "/incident" prefix from params's type

4.0.0

Changes

  • New output actions for incidents. Also remove/update obsolete code. (PR, #5999)

Breaking changes

  • Removed code, which is likely not used anywhere, but check the scenarios.

    • Runbox.Scenario.OutputAction.new_incident_action/2
    • %Runbox.Scenario.OutputAction.Incident{}
    • %Runbox.Scenario.OutputAction.IncidentState{}
  • New output actions of types :create_incident and :update_incident. Altworx has to know how to handle those when depending on this version.

3.0.0

Changes

  • Move certain modules from Toolbox to Runbox (PR, #5848)

Breaking changes

2.1.0

Changes

  • Remove runbox version check (PR, #5828)

2.0.0

Changes

  • Build scenarios with Elixir 1.14 and OTP 25 (to be compatible with Altworx 23.3+) (PR, #5799)

1.4.1

Changes

  • Bump toolbox dependency to 2.0.0

1.4.0

Changes

  • Start slave VM as a hidden node (PR, #5799)
  • Check that scenario timeouts are not registered to the past. (PR, #5827)
  • Use timeout message timestamp to register scenario timeouts. (PR, #5827)
  • Check input messages order prior sandbox run execution. (PR, #5827)

Breaking changes

  • API function to register timeouts Toolbox.Runtime.RuntimeInstruction.register_timeout/2 was removed, update scenarios to use Toolbox.Runtime.RuntimeInstruction.register_timeout/1 instead.
  • Field timeout was removed from Toolbox.Runtime.RuntimeInstruction.Timeout

1.3.0

Changes

1.2.0

Changes

  • Default mode is :slave. Scenario repositories do not need to set this anymore. Altworx needs to set the :master mode explicitly. (PR, #5714)
  • Find scenario modules for sandbox testing from the current mix app. Scenario repositories do not need to set :scenario_app app env anymore even for testing. (PR, #5714)

1.1.0

Changes

  • Mix task for building scenario releases (PR, #5713)

Additional info

  • There is no need to set :runbox, scenario_app: :app_name in the scenario app anymore. New task mix altworx.scenario_release does it automatically.

  • There is no need to set releases key in the project/1 of mix.exs in the scenario app. In fact, the release key is ignored when using the new mix task mix altworx.scenario_release.

1.0.0

Changes

  • Relax runbox version check (PR, #5817)

0.1.3

Changes

  • Add support for start_from in Sandbox (PR, #5821)
  • Explicitly load modules when checking if a function is exported (PR #5784)
  • Run slaves in interactive mode (PR #5784)

0.1.2

  • Bump toolbox dependency to 1.0.0

0.1.1

Changes

  • Use runbox from hex in demo livebook (PR)
  • Fix load topic in Sandbox (PR)

0.1.0

Changes

  • Runbox is in separate repository (PR, PR, #5711)