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 status to WAITING

  • Creates resource requests for buffer space

  • Waits for resources_available to be True

    • This is the signal from the processing controller that the script can run

  • Sets processing block status to RUNNING

  • At 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 status to READY

  • Waits for execution block status to be set to FINISHED

    • This is the signal from the Subarray device that the execution block is finished

  • Sets processing block status to FINISHED

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:
field lsm: LSMRequest | None = None
field request_lsm: bool = False
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

field size: int = 200

Size for the buffer space request in MB

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.

  • Set “sub_path” for LSM requests (mandatory field) (MR414)

  • Update ska-sdp-scripting to 3.0.1 (MR414)

  • Updated LSM requests to use helper functions (MR401)

  • Added option request_lsm parameter to test-realtime script (MR399)

2.0.1

  • use ska-sdp-scripting 2.0.0 (MR360)

  • Updated test-realtime script to use new request_buffer signature (MR343)

2.0.0

  • Replace “length” processing block parameter with “size” (MR295)

  • Set up resource requests for buffer space (MR295)

  • Update ska-sdp-scripting 1.1.2 (MR295)

1.0.0

  • Update ska-sdp-scripting to 1.0.0 (MR248)

  • Update Dockerfile to use SKA python base image (MR211)

0.9.0

  • Script allows simulating errors with the simulate_failed_engine_start and simulate_failed_engine_app parameters (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

  • Update to scripting library 0.9.0 and use ska-sdp-python base image (MR166)

  • Set up skart for dependency updates of processing scripts (MR156)

  • Use poetry for dependency management (MR155)

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 READY when 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