From ffa99709212d0dca3e09dd3d085a0b5a1bba2df0 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Fri, 27 Sep 2024 14:23:05 -0700 Subject: [PATCH] ceph-build-config.sh: filter out deleted tags Deleted tags still show up in the REST API. They have a non-null end_ts field. Since those images can't be pulled, they should not be listed as currently available, and should not affect the search for the latest available tag when checking from the build. Signed-off-by: Dan Mick --- contrib/ceph-build-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ceph-build-config.sh b/contrib/ceph-build-config.sh index 6918578a2..3339cf4b0 100644 --- a/contrib/ceph-build-config.sh +++ b/contrib/ceph-build-config.sh @@ -343,7 +343,7 @@ function get_tags_matching () { while response="$(curl --silent --fail --list-only --location \ "${tag_list_url}&page=${page}")"; do local matching_tags ; matching_tags="$(echo "${response}" | \ - jq -r ".tags[] | select(.name | match(\"${version_tag}\")) | .name")" + jq -r ".tags[] | select(.end_ts == null) | select(.name | match(\"${version_tag}\")) | .name")" # jq: From the results of the curl, select all images with a name matching the matcher, and then # output the name. Exits success w/ empty string if no matches found. if [ -n "${matching_tags}" ]; then