Test Batch Script

The test-batch 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

  • Reads value of duration parameter (type: float, units: seconds) from processing block

  • Sets processing block status to 'WAITING'

  • Waits for resources_available to be True

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

  • Sets processing block status to 'RUNNING'

  • Does some “processing” (i.e. sleeps) for the requested duration

  • 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 TestBatchParams

test-batch script parameters

Show JSON schema
{
   "title": "test-batch",
   "description": "test-batch script parameters",
   "type": "object",
   "properties": {
      "duration": {
         "default": 60.0,
         "description": "The duration, in seconds, that the script will simulate processing",
         "title": "Duration of batch processing",
         "type": "number"
      }
   },
   "additionalProperties": false
}

Config:
  • strict: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = False

  • validate_assignment: bool = True

  • title: str = test-batch

Fields:
field duration: float = 60.0

The duration, in seconds, that the script will simulate processing

Changelog

1.1.0

  • use ska-sdp-scripting 2.0.0 (MR360)

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

  • Update to have a example of overriding the expiry time (MR343)

1.0.0

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

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

0.8.0

  • 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.7.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.6.0

  • Update to scripting library 0.7.0

  • BREAKING This and newer versions are not compatible with SDP version < 0.21.0

0.5.0

  • Update to scripting library 0.6.1

0.4.1

  • Fix bug in how script determines if deployment is finished

0.4.0

  • Update to latest scripting library (0.5.0). This required the update of how phase.wait_loop is used in the script.

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