libera_utils.aws.algorithm_registration.put_new_algorithm_image_event#
- libera_utils.aws.algorithm_registration.put_new_algorithm_image_event(processing_step_id: str | ProcessingStepIdentifier, algorithm_version: str, *, boto_session: Session, image_digest: str | None = None, region_name: str | None = None, verify: bool = False, timeout: float = 300.0) None#
Emit a single NewAlgorithmImage event to the SDC event bus.
The event announces that a concrete algorithm image (one ECR tag) has been uploaded and that the SDC Registrar should register a corresponding versioned AWS Batch job definition for it.
- Parameters:
processing_step_id (str or ProcessingStepIdentifier) – The processing step whose algorithm this image implements. Determines the ECR repository name.
algorithm_version (str) – The concrete ECR image tag that was uploaded, e.g.
"1.2.3".boto_session (boto3.Session) – Boto3 session used to discover the event bus, resolve the account id, and put the event.
image_digest (str or None, optional) – Optional image digest (
sha256:...) carried for provenance/logging. Not required; the registered job definition references the tag, not the digest.region_name (str, optional) – AWS region containing the target ECR registry. If
None(the default), the region is taken from the session’s AWS configuration (seelibera_utils.aws.utils._session_region()).verify (bool, optional) – If True, block after emitting the event until the corresponding job definition is confirmed registered (see
verify_algorithm_registration()). Default False.timeout (float, optional) – Maximum number of seconds to wait for registration verification when
verifyis set.
- Raises:
ValueError – If
processing_step_idhas no associated ECR repository (e.g. an L0 step).RuntimeError – If EventBridge reports a failed entry when putting the event.