View Source Changelog
Master
Changes
22.0.0
Warnings
- The original Incident output actions (version 1) are now deprecated. They will still work for a
couple of releases, but it is advisable to migrate to V2 as soon as possible.
- Replace
Runbox.Scenario.OutputAction.IncidentwithRunbox.Scenario.OutputAction.V2.Incident - Replace
Runbox.Scenario.OutputAction.IncidentPatchwithRunbox.Scenario.OutputAction.V2.IncidentPatch - Notably V2 requires you to specify explicit actor keys.
- Replace
Changes
- Introduce version 2 of Incident output actions. (PR)
21.2.0
Changes
21.1.2
Changes
21.1.1
Changes
21.1.0
Changes
21.0.0
Warnings
- Notification templates can no longer access the primary actor (primary asset or incident)
via the
primary_assetvariable. Instead, it is now available via theprimary_actorvariable which is a map with the following structure:
For example:%{ "entity_type" => "asset" | "incident", "type" => "asset or incident type", "id" => "asset or incident ID" }%{"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/1was moved into Altworx. If you need to verify and unpack user actions in tests useRunbox.Runtime.Sandbox.UserActionSigner.validate_and_unpack/1.
Changes
- Document the change of
primary_assetvariable toprimary_actorin 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
idsandprimary_assetwas replaced withactorsandprimary_actor. SeeRunbox.Scenario.OutputAction.Notificationfor details. - Module
Runbox.Scenario.UIActionwas 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 toRunbox.Scenario.UserAction.pack/3which 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_linkneed 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
:groupsfrom 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
17.1.0
Changes
17.0.1
Changes
- Validate the type of actor fields inside the Incident OA (PR)
- Fix docs for
direct_subscriptionsin 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
16.2.0
Changes
16.1.0
Changes
16.0.0
Changes
15.0.0
Changes
14.1.0
Warnings
- Naming convention for manifest modules are no longer mandatory but the
module now needs to explicitly implement the
Runbox.Scenario.Manifestbehavior (use Runbox.Scenario.Manifest) to be recognized as valid
Changes
14.0.1
Changes
14.0.0
Warnings
- Function
Runbox.Runtime.OutputAction.is_oa_body?was renamed toRunbox.Runtime.OutputAction.oa_body?.
Changes
13.0.3
Changes
13.0.2
Changes
13.0.1
Changes
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.inias well. Occurrences in scenario savepoints will be renamed automatically. The list of the renamed structs is the following:Toolbox.Message→Runbox.Message(used in scenarios and normalizers)Toolbox.Runtime.Stage.Unit→Runbox.Runtime.Stage.Unit(used in StageBased scenarios)Toolbox.Scenario.UserAction→Runbox.Scenario.UserAction(used in scenarios and pipeline definition insideconfig.ini)Toolbox.JitterMessage→Runbox.JitterMessage(probably not used in scenario code)Toolbox.ErrorMessage→Runbox.ErrorMessage(probably not used in scenario code)
Changes
- Move Toolbox structs to the Runbox namespace (see warnings above) (PR, #5849, #5850, #5851, #5852, #5853)
12.1.0
Warnings
Runbox.Runtime.Simple.StageBasedEmulatorrequires Altworx 24.11+.
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
- The
unit_idfield of theRunbox.Runtime.RuntimeInstruction.Timeoutstruct was dropped, as runtime was just ignoring it.
Changes
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.exsfile but are now part of Manifest, all scenarios should now define their notifications specifications directly in scenario manifest.
Changes
- Improve docs for
Runbox.Scenario.OutputAction.Event(PR) - Move notification specification to scenario manifest (PR, #6569)
- Better separate scenario runtimes (PR, #6665)
8.0.0
Changes
7.0.1
Changes
- Anticipate errors from scenario manifest (PR, #6312)
- Explicitly propagate altworx root dir to slave (PR, #6331)
7.0.0
Warnings
- Scenarios are now built with Elixir 1.15.7 and OTP 26.2.1. There may be some breaking
changes for your code (see https://hexdocs.pm/elixir/1.15/changelog.html and
https://www.erlang.org/downloads/26). It is recommended to update your
.tool-versionsto match these versions.
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.OutputActionfor 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
:typeis gone and:bodyalways 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
Breaking changes
- Removed code which separated "/incident" prefix from params's type
4.0.0
Changes
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_incidentand:update_incident. Altworx has to know how to handle those when depending on this version.
3.0.0
Changes
Breaking changes
- Many modules were moved from Toolbox to Runbox (some kept their name, but the majority
of them was also renamed to be under the Runbox "namespace"), here are the ones that
affect scenario authors (for a complete list, see the task):
- Modules that will require changes in aliases (just replace
ToolboxwithRunbox)Toolbox.Notifications.TemplateHelper→Runbox.Notifications.TemplateHelperToolbox.Runtime.RuntimeInstruction→Runbox.Runtime.RuntimeInstructionToolbox.Utils.Path→Runbox.Utils.PathToolbox.Scenario.Config→Runbox.Scenario.ConfigToolbox.Scenario.Helper→Runbox.Scenario.HelperToolbox.Scenario.Manifest→Runbox.Scenario.Manifest
- A module that requires change of
@behaviour(just replaceToolboxwithRunbox)Toolbox.Scenario.Template.StageBased→Runbox.Scenario.Template.StageBased
- Configuration key move
:scenario_config_dirconfig key was moved from:toolboxto:runbox, you may have to change this in yourconfig/test.exs
- Modules that will require changes in aliases (just replace
2.1.0
Changes
2.0.0
Changes
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/2was removed, update scenarios to useToolbox.Runtime.RuntimeInstruction.register_timeout/1instead. - Field
timeoutwas removed fromToolbox.Runtime.RuntimeInstruction.Timeout
1.3.0
Changes
- Remove
Runbox.Scenario.Templateand use onlyRunbox.ScenarioTemplate. (PR)
1.2.0
Changes
- Default mode is
:slave. Scenario repositories do not need to set this anymore. Altworx needs to set the:mastermode explicitly. (PR, #5714) - Find scenario modules for sandbox testing from the current mix app. Scenario
repositories do not need to set
:scenario_appapp env anymore even for testing. (PR, #5714)
1.1.0
Changes
Additional info
There is no need to set
:runbox, scenario_app: :app_namein the scenario app anymore. New taskmix altworx.scenario_releasedoes it automatically.There is no need to set
releaseskey in theproject/1ofmix.exsin the scenario app. In fact, thereleasekey is ignored when using the new mix taskmix altworx.scenario_release.
1.0.0
Changes
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