fix(ci): verify repo index consistency in poll-upstream check
All checks were successful
poll-upstream / check (push) Successful in 1s
All checks were successful
poll-upstream / check (push) Successful in 1s
The RPM file existing on the server is not sufficient — the repo metadata must also reference it. After checking the file exists, verify repomd.xml is present and dnf repoquery can find the package in the index. This catches the case where sync succeeded but createrepo_c failed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,22 +31,44 @@ jobs:
|
||||
for target in "43:cuda13"; do
|
||||
fedora_version="${target%%:*}"
|
||||
flavour="${target##*:}"
|
||||
url="https://rpm.lair.cafe/fedora/${fedora_version}/x86_64/mistralrs-server-${flavour}-${version}-1.fc${fedora_version}.x86_64.rpm"
|
||||
base_url="https://rpm.lair.cafe/fedora/${fedora_version}/x86_64"
|
||||
rpm_name="mistralrs-server-${flavour}-${version}-1.fc${fedora_version}.x86_64.rpm"
|
||||
|
||||
# check that the rpm file exists
|
||||
http_code=$(curl \
|
||||
--silent \
|
||||
--write-out "%{http_code}" \
|
||||
--output /dev/null \
|
||||
--head \
|
||||
--url "${url}")
|
||||
if [ "${http_code}" = "200" ]; then
|
||||
echo "found: ${url}"
|
||||
elif [ "${http_code}" = "404" ]; then
|
||||
echo "missing: ${url}"
|
||||
--url "${base_url}/${rpm_name}")
|
||||
if [ "${http_code}" = "404" ]; then
|
||||
echo "missing: ${base_url}/${rpm_name}"
|
||||
needs_build=true
|
||||
else
|
||||
echo "unexpected HTTP ${http_code} for ${url}"
|
||||
continue
|
||||
elif [ "${http_code}" != "200" ]; then
|
||||
echo "unexpected HTTP ${http_code} for ${base_url}/${rpm_name}"
|
||||
exit 1
|
||||
fi
|
||||
echo "found: ${base_url}/${rpm_name}"
|
||||
|
||||
# check that the repo index references this package
|
||||
if ! curl --silent --fail "${base_url}/repodata/repomd.xml" \
|
||||
| grep --quiet 'primary'; then
|
||||
echo "missing or invalid repomd.xml at ${base_url}/repodata/"
|
||||
needs_build=true
|
||||
continue
|
||||
fi
|
||||
if ! dnf repoquery \
|
||||
--repofrompath=check,"${base_url}" \
|
||||
--repo=check \
|
||||
--quiet \
|
||||
"mistralrs-server-${flavour}-${version}" 2>&1 \
|
||||
| grep --quiet "mistralrs-server-${flavour}"; then
|
||||
echo "repo index missing: mistralrs-server-${flavour}-${version} not in ${base_url}/repodata/"
|
||||
needs_build=true
|
||||
continue
|
||||
fi
|
||||
echo "indexed: mistralrs-server-${flavour}-${version} in ${base_url}/repodata/"
|
||||
done
|
||||
echo "already_built=$( [ "${needs_build}" = "true" ] && echo false || echo true )" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user