Skip to content

Conversation

@AnthonyRonning
Copy link
Contributor

@AnthonyRonning AnthonyRonning commented Nov 23, 2025

This PR implements a temporary workaround for a critical GitHub Actions runner bug affecting macOS environments.

The hashFiles function 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.yml
  • desktop-build.yml
  • testflight-on-comment.yml
  • release.yml

Reference: actions/runner-images#13341

Summary by CodeRabbit

  • Chores
    • Standardized CI cache keys across desktop, mobile, release and TestFlight workflows to work around a macOS hashing issue, improving build consistency, reducing cache-related failures, and speeding CI runs. Added explanatory notes in the workflows to aid future maintenance.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 23, 2025

Note

Other AI code review bot(s) detected

CodeRabbit 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.

Walkthrough

Dynamic cache keys using hashFiles() were replaced with static, versioned keys across four GitHub Actions workflows (desktop-build, mobile-build, release, testflight-on-comment) with inline comments citing a macOS hashFiles bug; control flow and restore-keys remain unchanged.

Changes

Cohort / File(s) Summary
Homebrew cache key updates
.github/workflows/desktop-build.yml, .github/workflows/mobile-build.yml, .github/workflows/testflight-on-comment.yml
Replace hashFiles()-based Homebrew cache keys with static versioned keys (e.g., runner.os-brew-v1) and add macOS hashFiles workaround comments.
Xcode / sccache cache key updates
.github/workflows/desktop-build.yml, .github/workflows/mobile-build.yml, .github/workflows/release.yml, .github/workflows/testflight-on-comment.yml
Replace hashFiles()-based Xcode/sccache cache keys with static versioned keys (e.g., sccache-macos-v1, xcode-cache-testflight-...-v1) and add workaround comments; restore-keys unchanged.
Release workflow conditional sccache key
.github/workflows/release.yml
Use a macOS-specific static v1 key while retaining hashFiles() for non-macOS runners via a conditional expression; comment documents workaround.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Review focus: verify all cache keys were updated consistently, confirm comments and conditional in release.yml are correct, and ensure restore-keys remain appropriate.

Possibly related PRs

Poem

🐰 I hopped through workflows, soft and spry,
I swapped the hashes for v1's bright sky.
A comment tucked where bugs were found,
Now cached and calm, the builds rebound.
🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: replacing dynamic hashFiles-based cache keys with static versioned keys to work around a macOS runner bug across multiple workflow files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/macos-hashfiles-workaround

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 23, 2025

Deploying maple with  Cloudflare Pages  Cloudflare Pages

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

View logs

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 23, 2025

Greptile Overview

Greptile Summary

This PR replaces dynamic hashFiles() calls with static v1 cache keys in all macOS workflow jobs to work around a critical GitHub Actions runner bug.

  • desktop-build.yml: Replaced hashFiles() for Homebrew cache (line 36) and sccache cache (line 51)
  • mobile-build.yml: Replaced hashFiles() for Homebrew cache (line 32) and Xcode cache (line 40)
  • release.yml: Replaced hashFiles() for Homebrew cache (line 61) and applied conditional logic for sccache (line 87) to preserve hash-based keys on Linux
  • testflight-on-comment.yml: Replaced hashFiles() for Homebrew cache (line 90) and Xcode cache (line 98)

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

  • This PR is safe to merge with no risk
  • The changes are minimal, well-documented, and address a specific platform bug. Static cache keys are a standard workaround pattern and won't break functionality. The conditional logic in release.yml correctly preserves hash-based keys for Linux runners.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
.github/workflows/desktop-build.yml 5/5 Replaced hashFiles with static v1 keys for Homebrew and sccache caches on macOS to workaround runner bug
.github/workflows/mobile-build.yml 5/5 Replaced hashFiles with static v1 keys for Homebrew and Xcode caches to workaround macOS runner bug
.github/workflows/release.yml 5/5 Applied conditional logic to use static v1 key for macOS sccache while preserving hash-based keys for Linux
.github/workflows/testflight-on-comment.yml 5/5 Replaced hashFiles with static v1 keys for Homebrew and Xcode caches to workaround macOS runner bug

Sequence Diagram

sequenceDiagram
    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
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Edit Code Review Agent Settings | Greptile

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>
@AnthonyRonning AnthonyRonning force-pushed the fix/macos-hashfiles-workaround branch from 9ead4f6 to efa11bc Compare November 23, 2025 02:53
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Edit Code Review Agent Settings | Greptile

Copy link

@coderabbitai coderabbitai bot left a 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 v1 key resolves the macOS hashFiles bug 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 v1 key is appropriate for the macOS-only build. Note: Compare this approach to release.yml (line 87), which uses a conditional to preserve hashFiles() 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

📥 Commits

Reviewing files that changed from the base of the PR and between d891c86 and efa11bc.

📒 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.

@AnthonyRonning AnthonyRonning merged commit 56a3977 into master Nov 23, 2025
9 checks passed
@AnthonyRonning AnthonyRonning deleted the fix/macos-hashfiles-workaround branch November 23, 2025 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants