View Source Changelog

Master

Changes

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)