diff --git a/.github/base_digests/22.04 b/.github/base_digests/22.04 index aa2eb64f..bb44b88b 100644 --- a/.github/base_digests/22.04 +++ b/.github/base_digests/22.04 @@ -1 +1,2 @@ public.ecr.aws/ubuntu/ubuntu:jammy@sha256:c6871ae8b54fb3ed0ba4df4eb98527e9a6692088fe0c2f2260a9334853092b47 + diff --git a/src/workflow-engine/charms/temporal-worker/oci_factory/activities/find_images_to_update.py b/src/workflow-engine/charms/temporal-worker/oci_factory/activities/find_images_to_update.py index 81d7796c..72f28790 100755 --- a/src/workflow-engine/charms/temporal-worker/oci_factory/activities/find_images_to_update.py +++ b/src/workflow-engine/charms/temporal-worker/oci_factory/activities/find_images_to_update.py @@ -172,15 +172,22 @@ def find_released_revisions(releases_json: dict) -> dict: for tag in tags["imageTagDetails"]: if tag["imageDetail"].get("imageDigest") != revision_digest: continue - try: - to_track, to_risk = tag["imageTag"].rsplit("_", 1) - except ValueError as err: - if "not enough values to unpack" in str(err): - to_track = "latest" - to_risk = tag["imageTag"] - else: - logging.exception(f"Unrecognized tag {tag['imageTag']}") - continue + + if tag["imageTag"] in ["edge", "beta", "candidate", "stable"]: + to_track = "latest" + to_risk = tag["imageTag"] + else: + try: + to_track, to_risk = tag["imageTag"].rsplit("_", 1) + except ValueError as err: + if "not enough values to unpack" in str(err): + # These cases are driven by the alias which + # is created for tags like _stable + to_track = tag["imageTag"] + to_risk = "stable" + else: + logging.exception(f"Unrecognized tag {tag['imageTag']}") + continue if to_track not in release_to: release_to[str(to_track)] = {"risks": [to_risk]}