Repository navigation
ci: fix yarn cache and replace deprecated actions - #1234
Merged
Merged
Conversation
The `Get yarn cache` step ran `yarn cache dir`, a Yarn 1 command. This
repo is on Yarn 4 (`packageManager: yarn@4.1.1`, `yarnPath` in
`.yarnrc.yml`), so the command exits with a usage error and its stderr
becomes the cache path:
actions/cache@v4 path: Unknown Syntax Error: Command not found
Cache not found for input keys: Linux-yarn-1087...
Post Run actions/cache@v4
Path Validation Error: Path(s) specified in the action for caching
do(es) not exist, hence no cache is being saved.
The cache therefore never restored and never saved in any of the four
jobs that declare it. Use `yarn config get cacheFolder` instead, which
is the Yarn 4 equivalent.
The same line used `::set-output::`, which GitHub has deprecated and
plans to disable, so it moves to `$GITHUB_OUTPUT`.
Also bump the actions that GitHub is force-running on Node 24:
checkout@v2 -> v5, setup-node@v1 -> v5, setup-java@v1 -> v5. setup-java
v2+ requires an explicit `distribution`; `temurin` matches the
`adoptopenjdk-17.0.10+7` in `.tool-versions`.
Finally, rename the lint step from "ESLint Checks" to "Biome Checks" --
it runs `yarn lint`, which is Biome. The job name is unchanged, so the
`lint (22)` status check keeps its name.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This started as an investigation into the failing
Buildrun onmaster(31983633654, 2026-08-17,androidjob). That failure does not reproduce. Its logs have expired (HTTP 410), PR runs on the same code passed on both Aug 16 and Aug 19, a freshworkflow_dispatchonmastertoday is fully green (43666919034), and a clean local./gradlew clean assembleDebugsucceeds. It looks transient and there is no evidence left to diagnose it.What the investigation did turn up is a real defect: the yarn cache has never worked.
Problem
The
Get yarn cachestep runsyarn cache dir, a Yarn 1 command. This repo is on Yarn 4 (packageManager: yarn@4.1.1,yarnPathin.yarnrc.yml), so the command exits with a usage error and its stderr becomes the cache path. From today's green run:So the cache never restores and never saves, in all four jobs that declare it. Every run re-downloads the full dependency tree. It fails silently as a warning, which is why it went unnoticed while CI stayed green.
Changes
yarn cache dir→yarn config get cacheFolder— the Yarn 4 equivalent. Verified it resolves correctly under Yarn 4.1.1.::set-output::→$GITHUB_OUTPUT— same line; GitHub has deprecatedset-outputand plans to disable it.checkout@v2→v5,setup-node@v1→v5,setup-java@v1→v5.setup-javav2+ requires an explicitdistribution;temurinmatches theadoptopenjdk-17.0.10+7pinned in.tool-versions.yarn lint, which is Biome — there is no ESLint config in the repo. The job name is unchanged, so thelint (22)status check keeps its name and branch protection is unaffected.Verification
masterimmediately before this change, so this PR's run is a clean A/B on the same code.set-output/yarn cache dir.BUILD SUCCESSFUL, Java 17 + AGP via react-native-test-app).Get yarn cachenow prints a real path andPost Run actions/cache@v4saves instead of warning. Worth a look at the log before merging.Not addressed
androidflake. No logs survive; nothing to fix without a reproduction. If it returns, the next run's logs will be readable.ubuntu-latest→ Ubuntu 26. GitHub began that migration on 2026-10-19 and it is a plausible mechanism for an Android job that intermittently breaks. Pinningubuntu-24.04would insulate CI from it, but that changes the build environment and belongs in its own PR rather than riding along here.Cannot add extension with name 'kotlin', which is not what happened here. Still worth merging on its own merits.🤖 Generated with Claude Code