From 9cb3f84c6ab78dfa232ca3185174616ecc5e057c Mon Sep 17 00:00:00 2001 From: lawrencecchen <54008264+lawrencecchen@users.noreply.github.com> Date: Thu, 18 Jun 2026 15:52:12 -0700 Subject: [PATCH] ci: self-heal resolve must clear the WHOLE .ci-source-packages, not just artifacts The prior self-heal removed only .ci-source-packages/artifacts and retried -resolvePackageDependencies, but resolve does NOT re-materialize artifacts into a partially-populated tree (verified: rm artifacts + resolve leaves them missing). And the verify matched any sentry-cocoa/*/*.xcframework, so an incomplete cache (missing the specific sentry-cocoa/Sentry/Sentry.xcframework the build links) passed spuriously and then failed the build. Verify the exact required frameworks (sparkle/Sparkle + sentry-cocoa/Sentry); on miss, clear the whole .ci-source-packages so the retry does a full clean resolve, which reliably produces the complete artifact set. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8554399b454..940e37965578 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -367,11 +367,11 @@ jobs: # .ci-source-packages can make resolve report success without the # binary artifacts (Sparkle/Sentry) actually present, which then # fails the build. Verify they materialized; if not, clear and retry. - if [ -d "$SOURCE_PACKAGES_DIR/artifacts/sparkle/Sparkle/Sparkle.xcframework" ] && ls -d "$SOURCE_PACKAGES_DIR"/artifacts/sentry-cocoa/*/*.xcframework >/dev/null 2>&1; then + if [ -d "$SOURCE_PACKAGES_DIR/artifacts/sparkle/Sparkle/Sparkle.xcframework" ] && [ -d "$SOURCE_PACKAGES_DIR/artifacts/sentry-cocoa/Sentry/Sentry.xcframework" ]; then exit 0 fi echo "Resolve succeeded but binary artifacts are missing (stale cache); clearing and retrying" >&2 - rm -rf "$SOURCE_PACKAGES_DIR/artifacts" + rm -rf "$SOURCE_PACKAGES_DIR" # whole dir — resolve will not re-materialize artifacts into a partial tree fi if [ "$attempt" -eq 3 ]; then echo "Failed to resolve Swift packages after 3 attempts" >&2 @@ -792,11 +792,11 @@ jobs: # .ci-source-packages can make resolve report success without the # binary artifacts (Sparkle/Sentry) actually present, which then # fails the build. Verify they materialized; if not, clear and retry. - if [ -d "$SOURCE_PACKAGES_DIR/artifacts/sparkle/Sparkle/Sparkle.xcframework" ] && ls -d "$SOURCE_PACKAGES_DIR"/artifacts/sentry-cocoa/*/*.xcframework >/dev/null 2>&1; then + if [ -d "$SOURCE_PACKAGES_DIR/artifacts/sparkle/Sparkle/Sparkle.xcframework" ] && [ -d "$SOURCE_PACKAGES_DIR/artifacts/sentry-cocoa/Sentry/Sentry.xcframework" ]; then exit 0 fi echo "Resolve succeeded but binary artifacts are missing (stale cache); clearing and retrying" >&2 - rm -rf "$SOURCE_PACKAGES_DIR/artifacts" + rm -rf "$SOURCE_PACKAGES_DIR" # whole dir — resolve will not re-materialize artifacts into a partial tree fi if [ "$attempt" -eq 3 ]; then echo "Failed to resolve Swift packages after 3 attempts" >&2 @@ -1288,11 +1288,11 @@ jobs: # .ci-source-packages can make resolve report success without the # binary artifacts (Sparkle/Sentry) actually present, which then # fails the build. Verify they materialized; if not, clear and retry. - if [ -d "$SOURCE_PACKAGES_DIR/artifacts/sparkle/Sparkle/Sparkle.xcframework" ] && ls -d "$SOURCE_PACKAGES_DIR"/artifacts/sentry-cocoa/*/*.xcframework >/dev/null 2>&1; then + if [ -d "$SOURCE_PACKAGES_DIR/artifacts/sparkle/Sparkle/Sparkle.xcframework" ] && [ -d "$SOURCE_PACKAGES_DIR/artifacts/sentry-cocoa/Sentry/Sentry.xcframework" ]; then exit 0 fi echo "Resolve succeeded but binary artifacts are missing (stale cache); clearing and retrying" >&2 - rm -rf "$SOURCE_PACKAGES_DIR/artifacts" + rm -rf "$SOURCE_PACKAGES_DIR" # whole dir — resolve will not re-materialize artifacts into a partial tree fi if [ "$attempt" -eq 3 ]; then echo "Failed to resolve Swift packages after 3 attempts" >&2