Skip to content

Commit

Permalink
fix: incorrect location to skip release
Browse files Browse the repository at this point in the history
  • Loading branch information
clay-lake committed Dec 19, 2024
1 parent 490c112 commit e53f1a2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/image/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
# - the target tags (when following) do not incur in a circular dependency
# - the target tags (when following) exist
tag_to_revision = tag_mapping_from_trigger.copy()
eol_tags = []
for channel_tag, target in tag_mapping_from_trigger.items():
# a target cannot follow its own tag
if target == channel_tag:
Expand Down Expand Up @@ -177,12 +178,10 @@

# TODO: we should be parsing the timetamp to unix time for comparison
# this can be dangerous if the timestamp formatting changes. Also see:
# src/image/prepare_single_image_build_matrix.py
# oci-factory/tools/workflow-engine/charms/temporal-worker/oci_factory/activities/find_images_to_update.py
is_eol |= all_releases[track]["end-of-life"] < execution_timestamp

# if we are eol, skip this release
if is_eol:
continue
if all_releases[track]["end-of-life"] < execution_timestamp:
eol_tags.append(tag)

if int(follow_tag) not in revision_to_track:
msg = str(
Expand Down Expand Up @@ -226,6 +225,10 @@
)
github_tags = []
for revision, tags in group_by_revision.items():

if tag in eol_tags:
print("Skipping release of {tag} since it is end of life.")

revision_track = revision_to_track[revision]
source_img = (
"docker://ghcr.io/" f"{args.ghcr_repo}/{img_name}:{revision_track}_{revision}"
Expand Down

0 comments on commit e53f1a2

Please sign in to comment.