Repository navigation
ci: run Flipcash2's test tasks from an empty Gradle cache on build PRs - #2065
Merged
Merged
Conversation
Flipcash2 Build and Deploy runs only on workflow_dispatch, and its setup-java Gradle cache misses whenever a version or build script changes, so it downloads every dependency. CI restores code/cash's Gradle home, so #2040 and #2051 passed it and then failed Flipcash2 on Maven Central 429s. The new workflow runs `fastlane flipcash_tests` with no Gradle cache on PRs that touch build-logic, buildSrc, the root build scripts, gradle/, gradle.properties, kotlin-js-store or the Fastfile. CLAUDE.md now asks for the failing request's HTTP status and URL before a download fix.
`git worktree add` fires no SessionStart hook, so the worktree had no local.properties and Gradle failed to configure :apps:flipcash:app with a FileNotFoundException. The skill now copies it from the main checkout.
The first run lost its ubuntu-24.04 runner 62 minutes into fastlane flipcash_tests, and no log was uploaded. Flipcash2's passing test runs restore both its dependency and build caches; this job compiles everything with the project's -Xmx6g daemons, the setup ci.yml capped after #1996 lost runners the same way. Write ci.yml's heap caps to ~/.gradle/gradle.properties, which overrides the project's, so the fastlane command stays the same as Flipcash2's. Raise the timeout to 120 minutes.
Flipcash2's lane ends with :apps:flipcash:app:lintDebug, which lints every module, and from an empty cache that does not fit the runner. With the project's 6 GB daemon heaps the first run lost its runner 62 minutes in. With ci.yml's caps the second run finished the test tasks in 28 minutes (no failed requests) and was still linting 90 minutes later when it hit the 120-minute timeout. Run ci.yml's capped unit-test command with -PskipCoverage=true, which is the lane's task list minus lint, instead of fastlane. That removes the Ruby setup and the ~/.gradle/gradle.properties step, and the fastlane/Fastfile path trigger. Timeout 50 minutes. The check no longer resolves lint's classpath or the androidTest classpaths that only the lint tasks resolve; CLAUDE.md and the CI doc now say it covers the test tasks only.
…ep-resolve * origin/code/cash: docs(claude): bound the whole operation a timeout's budget covers (#2068) fix(notifications): write pushes that beat the database, and finish reply actions (#2061) fix(chat): keep in-flight sends when a server echo arrives (#2058) fix(messenger): keep text typed while a chat's draft loads (#2064) fix(chat): coalesce delta syncs, lock the sequence tracker, resync on resume, fix typing heartbeat (#2063) fix(grpc): give unary calls a 30 second default deadline (#2062) fix(chat): clear opened photos on logout and keep staged photos out of backup (#2060) fix(desktop): bind TransactionRouter so the desktop graph compiles again (#2067) # Conflicts: # CLAUDE.md
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.
Flipcash2 Build and Deploy runs only on
workflow_dispatch, so a build change reaches it after merge. Itssetup-javaGradle cache misses whenever a version or build script changes, and the job then downloads every dependency. CI restorescode/cash's Gradle home and never makes those requests. #2040 and #2051 both passed CI and then failed Flipcash2 on a Maven Central429 Too Many Requests: an android-all jar in run 45655461980, and the Node.js pom in run 45850181346.flipcash2-cold-cache.ymlruns the test tasks of Flipcash2'stestjob (generateEmojiList kotlinStorePackageLock jsNodeTest flipcashTestDebugwith-PskipCoverage=true) with nothing restored into~/.gradle, usingci.yml's heap caps. A step before it fails if~/.gradle/caches/modules-2or~/.m2/repositoryalready exists, sincesettings.gradle.ktslistsmavenLocal(). It runs on manual dispatch and on PRs that touchbuild-logic/,buildSrc/, the rootbuild.gradle.ktsorsettings.gradle.kts,gradle/,gradle.properties,kotlin-js-store/, theprovision-configaction or the workflow itself. Config comes fromprovision-config, so Dependabot PRs get placeholder keys rather than empty ones. It shouldn't become a required check: a required check that the path filter skips never reports.It leaves out the lane's last task,
:apps:flipcash:app:lintDebug, which lints every module and doesn't fit the runner from an empty cache. The first run here, with the project's 6 GB daemon heaps, lost its runner 62 minutes in. The second, withci.yml's caps, finished the test tasks in 28 minutes and was still linting 90 minutes later when it timed out. So the check doesn't resolve lint's own classpath, or theandroidTestclasspaths that only the lint tasks resolve.CLAUDE.mdanddocs/architecture/15-ci-and-release.mdnow say to get the failing request's HTTP status and URL before writing a fix for a failed download.The
dep-reviewskill creates its worktree withgit worktree add, which fires no hook, so the worktree had nolocal.propertiesand Gradle failed to configure:apps:flipcash:appwith aFileNotFoundException. The skill now copies the file from the main checkout. It copies rather than symlinks because a worktree can set its own overrides there, such asprotoLocalRoot.