Repository navigation
ci: self-heal resolve clears whole .ci-source-packages on incomplete artifacts - #6403
Conversation
…ust 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) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThree CI job sections in ChangesCI Swift Package Cache Guard
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (20 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR tightens the self-heal logic in the "Resolve Swift packages" retry loop across all three CI jobs. It replaces a wildcard
Confidence Score: 4/5Safe to merge; the change correctly fixes the intermittent artifact-missing failure on main and is consistently applied across all three jobs. After rm -rf SOURCE_PACKAGES_DIR the directory is gone, but mkdir -p only runs once before the loop. The next xcodebuild -clonedSourcePackagesDirPath call lands on a path that no longer exists. xcodebuild almost certainly creates it, but the intent is clearer and safer with an explicit mkdir -p immediately after the rm -rf. This pattern repeats in all three jobs. .github/workflows/ci.yml — the three Resolve Swift packages blocks all share the same missing mkdir -p after rm -rf SOURCE_PACKAGES_DIR. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Start: attempt 1..3] --> B[xcodebuild -resolvePackageDependencies]
B -->|non-zero exit| F{attempt == 3?}
B -->|exit 0| C{Check Sparkle.xcframework present?}
C -->|yes| D{Check Sentry/Sentry.xcframework present?}
D -->|yes| E[exit 0 success]
D -->|no| G[rm -rf SOURCE_PACKAGES_DIR whole dir]
C -->|no| G
G --> F
F -->|yes| H[exit 1 failure]
F -->|no| I[sleep attempt x 5s]
I --> A
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[Start: attempt 1..3] --> B[xcodebuild -resolvePackageDependencies]
B -->|non-zero exit| F{attempt == 3?}
B -->|exit 0| C{Check Sparkle.xcframework present?}
C -->|yes| D{Check Sentry/Sentry.xcframework present?}
D -->|yes| E[exit 0 success]
D -->|no| G[rm -rf SOURCE_PACKAGES_DIR whole dir]
C -->|no| G
G --> F
F -->|yes| H[exit 1 failure]
F -->|no| I[sleep attempt x 5s]
I --> A
|
Fixes intermittent 'no XCFramework found (Sparkle/Sentry)' on main: incomplete restored Swift-package cache passed the old loose verify, and clearing only artifacts didn't re-materialize them. Now verifies the exact required frameworks and clears the whole .ci-source-packages on miss so the retry does a full clean resolve.
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Workflow-only change to cache validation and cleanup; no app, auth, or release logic touched.
Overview
Tightens the Swift package resolve self-heal step used after restoring
.ci-source-packagesin the macOS CI jobs (tests,tests-build-and-lag,ui-regressions).After
xcodebuild -resolvePackageDependencies, the post-resolve check now requires exact Sparkle and Sentry binary paths (Sparkle.xcframeworkandSentry/Sentry.xcframework) instead of a loose glob for any Sentry xcframework undersentry-cocoa. That closes the gap where a partial or stale cache could still pass verification and later fail with missing XCFramework errors.When verification fails, the retry path deletes the entire
.ci-source-packagesdirectory (not onlyartifacts/), so the next attempt does a full clean resolve instead of leaving a partial tree that Xcode would not fully repopulate.Reviewed by Cursor Bugbot for commit 9cb3f84. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Prevents intermittent "no XCFramework found" CI failures by validating the exact
SparkleandSentryartifacts and, if missing, clearing the entire.ci-source-packagesto force a clean SwiftPM resolve.artifacts/sparkle/Sparkle/Sparkle.xcframeworkandartifacts/sentry-cocoa/Sentry/Sentry.xcframeworkinstead of using a loose wildcard match..ci-source-packagesdirectory (not justartifacts) so the retry re-materializes all required binaries.Written for commit 9cb3f84. Summary will update on new commits.
Summary by CodeRabbit