-
Notifications
You must be signed in to change notification settings - Fork 5
Fix: Workaround macOS hashFiles runner bug #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughDynamic cache keys using Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Deploying maple with
|
| Latest commit: |
efa11bc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://354f55e5.maple-ca8.pages.dev |
| Branch Preview URL: | https://fix-macos-hashfiles-workarou.maple-ca8.pages.dev |
Greptile OverviewGreptile SummaryThis PR replaces dynamic
All changes include proper comments linking to the upstream issue. The workaround successfully unblocks macOS builds while maintaining cache functionality through versioned static keys. Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant GHA as GitHub Actions
participant Runner as macOS Runner
participant Cache as Cache Storage
participant Build as Build Process
Note over GHA,Build: Before PR - Dynamic Hash Keys
GHA->>Runner: Start workflow
Runner->>Cache: Request cache with dynamic hash key
Cache-->>Runner: Error - hashFiles function fails
Runner->>GHA: Workflow fails
Note over GHA,Build: After PR - Static Version Keys
GHA->>Runner: Start workflow
Runner->>Cache: Request cache with static v1 key
Cache-->>Runner: Success - Returns cache or creates new
Runner->>Build: Proceed with cached dependencies
Build-->>Runner: Build completes
Runner->>Cache: Save cache with static v1 key
Runner->>GHA: Workflow succeeds
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, 1 comment
Temporarily replace hashFiles with static keys on macOS runners due to a GitHub Actions runner bug causing 'The template is not valid' errors. Reference: actions/runner-images#13341 Affected workflows: - mobile-build.yml - desktop-build.yml - testflight-on-comment.yml - release.yml Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
9ead4f6 to
efa11bc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/mobile-build.yml (1)
31-32: Approve static key for Homebrew cache; document cache invalidation implications.The static
v1key resolves the macOShashFilesbug and is well-commented. However, note that this key will never invalidate due to workflow or dependency changes on macOS. Developers should be aware they can manually bump the version suffix (e.g.,v2) to force cache invalidation if needed..github/workflows/desktop-build.yml (1)
50-51: LGTM for this macOS-only job.Static
v1key is appropriate for the macOS-only build. Note: Compare this approach to release.yml (line 87), which uses a conditional to preservehashFiles()on Linux while applying the v1 workaround only on macOS. That pattern is more future-proof for mixed-platform workflows..github/workflows/release.yml (1)
86-87: Excellent use of conditional logic.This is the superior approach for mixed-platform workflows. The conditional key applies the v1 workaround on macOS while preserving
hashFiles()invalidation on Linux. This pattern should be preferred in any future multi-platform cache configurations, as it balances the workaround need with proper cache invalidation semantics on unaffected platforms.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/desktop-build.yml(2 hunks).github/workflows/mobile-build.yml(1 hunks).github/workflows/release.yml(2 hunks).github/workflows/testflight-on-comment.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: build-linux
- GitHub Check: build-android
- GitHub Check: build-macos (universal-apple-darwin)
- GitHub Check: build-ios
- GitHub Check: Cloudflare Pages
🔇 Additional comments (5)
.github/workflows/mobile-build.yml (1)
39-40: LGTM.The Xcode cache key follows the same workaround pattern as the Homebrew cache. Consistent and correct.
.github/workflows/desktop-build.yml (1)
35-36: LGTM.Consistent with the Homebrew cache workaround applied in mobile-build.yml.
.github/workflows/testflight-on-comment.yml (2)
89-90: LGTM.Consistent with the Homebrew cache workaround applied in other workflows.
97-98: LGTM.Consistent pattern with mobile-build.yml for the Xcode DerivedData cache.
.github/workflows/release.yml (1)
60-61: LGTM.The cache step is correctly guarded with
if: matrix.platform == 'macos-latest', so the v1 workaround is appropriately scoped to macOS only.
This PR implements a temporary workaround for a critical GitHub Actions runner bug affecting macOS environments.
The
hashFilesfunction is currently throwing 'The template is not valid' errors on macOS runners. To unblock builds, this PR replaces dynamic hash-based cache keys with static keys (v1) for macOS jobs in the following workflows:mobile-build.ymldesktop-build.ymltestflight-on-comment.ymlrelease.ymlReference: actions/runner-images#13341
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.