fix(ci): stop gradle daemon between flutter build apk and assembleAndroidTest #554

Merged
guettlibot merged 1 commits from refs/pull/554/head into main 2026-06-10 11:13:33 +00:00
guettlibot commented 2026-06-10 10:07:34 +00:00 (Migrated from codeberg.org)

Summary

The Firebase Test Lab job (issue #549) failed because flutter build apk --debug --no-pub spawned a Gradle daemon, whose journal-cache lock file was left on the persistent Dagger gradle-cache mount after the WithExec container was torn down. The next exec, ./gradlew --no-daemon app:assembleAndroidTest, then timed out after 60s waiting for that stale lock:

> Timeout waiting to lock journal cache (/home/ci/.gradle/caches/journal-1). It is currently in use by another process.
  Owner PID: 88
  Our PID: 53

The pre-existing --no-daemon only prevented stale daemon-registry reuse, not stale lock files.

Fix: chain ./gradlew --stop into the first WithExec so the daemon shuts down gracefully and releases its locks before Dagger snapshots the layer.

Test plan

  • CI passes
  • Manually re-run the Firebase Tests workflow (workflow_dispatch) and confirm the Gradle journal-lock error no longer appears

Closes #549

🤖 Generated with Claude Code

## Summary The Firebase Test Lab job (issue #549) failed because `flutter build apk --debug --no-pub` spawned a Gradle daemon, whose journal-cache lock file was left on the persistent Dagger `gradle-cache` mount after the `WithExec` container was torn down. The next exec, `./gradlew --no-daemon app:assembleAndroidTest`, then timed out after 60s waiting for that stale lock: ``` > Timeout waiting to lock journal cache (/home/ci/.gradle/caches/journal-1). It is currently in use by another process. Owner PID: 88 Our PID: 53 ``` The pre-existing `--no-daemon` only prevented stale daemon-registry reuse, not stale lock files. **Fix:** chain `./gradlew --stop` into the first `WithExec` so the daemon shuts down gracefully and releases its locks before Dagger snapshots the layer. ## Test plan - [ ] CI passes - [ ] Manually re-run the Firebase Tests workflow (`workflow_dispatch`) and confirm the Gradle journal-lock error no longer appears Closes #549 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.