Test Real-Time Script
The test-realtime script is designed to test the processing
controller logic concerning processing block dependencies.
The sequence of actions carried out by the script is:
Claims processing block
Sets processing block
statustoWAITINGCreates resource requests for buffer space
Waits for
resources_availableto beTrueThis is the signal from the processing controller that the script can run
Sets processing block
statustoRUNNINGAt this point a substantive script would make deployments to do the processing
If a Local Sky Model has been requested via the processing block parameters, a flow is configured that will be monitored by the GSM service to write the LSM to disk.
Sets processing block
statustoREADYWaits for execution block
statusto be set toFINISHEDThis is the signal from the Subarray device that the execution block is finished
Sets processing block
statustoFINISHED
The script makes no deployments.
Full description of processing block parameters of this script can be found at the bottom of this page.
Processing block parameters
- pydantic settings TestRealtimeParams
test-realtime script parameters
Show JSON schema
{ "title": "test-realtime", "description": "test-realtime script parameters", "type": "object", "properties": { "size": { "default": 200, "description": "Size for the buffer space request in MB", "title": "Size for the buffer space request in MB", "type": "integer" }, "simulate_failed_engine_app": { "default": false, "description": "If True, update the processing script state with an error message", "title": "Simulate an error in an execution engine application", "type": "boolean" }, "simulate_failed_engine_start": { "default": false, "description": "If True, update the processing script state with an error messageand with state=FAILED", "title": "Simulate an error in starting an engine pod", "type": "boolean" }, "request_lsm": { "default": false, "title": "Request Local Sky Model", "type": "boolean" }, "lsm": { "anyOf": [ { "$ref": "#/$defs/LSMRequest" }, { "type": "null" } ], "default": null, "title": "Local Sky Model request parameters" } }, "$defs": { "LSMRequest": { "description": "Parameters for requesting a Local Sky Model", "properties": { "ra_deg": { "description": "Right Ascension in degrees for the center of the cone search", "title": "Right Ascension", "type": "number" }, "dec_deg": { "description": "Declination in degrees for the center of the cone search", "title": "Declination", "type": "number" }, "fov_deg": { "description": "Diameter in degrees of the cone search", "title": "Field of View", "type": "number" }, "version": { "default": "latest", "description": "Version of the GSM to query", "title": "GSM version", "type": "string" }, "catalogue_name": { "default": "TEST_CATALOGUE_1", "description": "Name of the catalogue in the GSM to query", "title": "Catalogue name", "type": "string" } }, "required": [ "ra_deg", "dec_deg", "fov_deg" ], "title": "LSMRequest", "type": "object" } }, "additionalProperties": false }
- Config:
strict: bool = True
extra: str = forbid
arbitrary_types_allowed: bool = False
validate_assignment: bool = True
title: str = test-realtime
- Fields:
- Validators:
validate_lsm»all fields
- field simulate_failed_engine_app: bool = False
If True, update the processing script state with an error message
- field simulate_failed_engine_start: bool = False
If True, update the processing script state with an error messageand with state=FAILED
- validator validate_lsm » all fields
Ensure LSM parameters exist if request_lsm=True
Changelog
2.1.1
NOTE: this version was released with the old resource model in scripts.yaml but every other code is the same as 2.1.0. This is compatible with older SDP AssignResources schemas but not with 2.0.
2.1.0
BREAKING: this script is only compatible with SDP AssignResources 2.0 schema.
2.0.1
2.0.0
1.0.0
0.9.0
Script allows simulating errors with the
simulate_failed_engine_startandsimulate_failed_engine_appparameters (MR202)Update ska-sdp-scripting to 0.12.0 (MR202)
Processing script reports internal errors in pb state (MR185)
Pydantic model included in documentation (MR189)
JSON parameter schema added to tmdata (MR186)
Validate processing block parameters using scripting library 0.10.0 (MR180)
Added processing block parameter JSON schema and Pydantic model (MR174, MR177)
0.8.0
0.7.0
Update to scripting library 0.7.0
BREAKING This and newer versions are not compatible with SDP version < 0.21.0
0.6.0
Update to scripting library 0.6.1
0.5.1
Update to latest scripting library (0.5.2).
0.5.0
Update to latest scripting library (0.5.0). This required the update of how phase.wait_loop is used in the script.
0.4.0
Update scripting library to 0.4.1.
Set status to
READYwhen script is ready to do its (fake) processing.
0.3.0
Port to use SDP scripting library (formerly known as the workflow library).
0.2.5
Use dependencies from the central artefact repository and publish the workflow image there.
0.2.4
Ported to use the latest version of workflow library (0.2.4).
0.2.3
use python:3.9-slim as the base docker image