libera_utils.aws.algorithm_registration.verify_algorithm_registration#

libera_utils.aws.algorithm_registration.verify_algorithm_registration(ecr_repository_name: str, ecr_repository_uri: str, algorithm_version: str, *, boto_session: Session, timeout: float = 300.0, poll_interval: float = 10.0) None#

Verify the referenced ECR image exists and an ACTIVE Batch job definition references it.

Two independent checks are performed:

  1. The referenced image ({ecr_repository_name}:{algorithm_version}) actually exists in ECR. This is checked first and unconditionally – even if a matching Batch job definition already exists – because registering a job definition for a nonexistent image would produce a job definition that can never run.

  2. Some ACTIVE Batch job definition has containerProperties.image equal to {ecr_repository_uri}:{algorithm_version}. This is naming-agnostic and polled until it appears.

Parameters:
  • ecr_repository_name (str) – The short ECR repository name (e.g. l1b-rad-docker-repo), used to look the image up in ECR.

  • ecr_repository_uri (str) – The full ECR registry URI for the algorithm image (without tag).

  • algorithm_version (str) – The concrete ECR image tag that should exist in ECR and be referenced by the registered job definition.

  • boto_session (boto3.Session) – Boto3 session used for the (read-only) ECR and Batch describe calls.

  • timeout (float, optional) – Maximum number of seconds to wait for the job definition to appear. Default 300 (5 minutes).

  • poll_interval (float, optional) – Number of seconds between polling passes. Default 10.

Raises:
  • ValueError – If the referenced image does not exist in ECR.

  • TimeoutError – If no matching ACTIVE job definition is found before the timeout elapses.