Files
computer-playbook/scripts/meta/resolve/missing/ci_images.sh
T
kevinveenbirkenbachandClaude Opus 5 964f3255f5 fix(ci): gate registry images on architecture completeness, not existence
Every check asked `docker manifest inspect` whether a tag resolved. A tag
serving only amd64 answers yes, so the arm64 half of the pool could be
absent from `latest` while the release, the CI-image wait and the cron
picker all reported the images present.

`architectures.sh` answers the narrower question instead: given a reference,
which architectures must it serve that it does not. It subtracts the
manifest index's platforms from `resolve_architectures()`, so the pool stays
declared in one place and an absent tag and a single-architecture tag give
the same answer to every caller.

`highest_release_tag.sh` checks `latest` before it walks the version tags.
The published install instructions name the image without a tag, so a reader
pulls `latest`, and only a release of the highest version republishes it: an
architecture missing from `latest` is therefore reported as that version
missing. Older tags stay an existence check, because their source predates
the architecture and no rebuild for it is available.

The CI-image wait is handed the run's own architecture list, the same
expression the build matrix and the manifest step already read, so it cannot
demand more than the run produced. The two release workflows pass no list and
therefore require the whole pool, which is what drives the rebuild.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-29 13:56:15 +02:00

29 lines
704 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
: "${OWNER:?Missing OWNER}"
: "${CI_TAG:?Missing CI_TAG}"
: "${REGISTRY:?Missing REGISTRY}"
: "${REPO_PREFIX:?Missing REPO_PREFIX}"
: "${INFINITO_DISTROS:?Missing INFINITO_DISTROS}"
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OWNER="$("${script_dir}/../repository/owner.sh")"
REPO_PREFIX="${REPO_PREFIX,,}"
missing="false"
for distro in ${INFINITO_DISTROS}; do
img="${REGISTRY}/${OWNER}/${REPO_PREFIX}/${distro}:${CI_TAG}"
echo "Check: ${img}" >&2
absent="$("${script_dir}/architectures.sh" "${img}")"
if [[ -z "${absent}" ]]; then
echo " OK" >&2
else
echo " MISSING ${absent}" >&2
missing="true"
fi
done
printf '%s\n' "${missing}"