0
0
Fork
You've already forked sharedinbox
0

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

Merged
guettli merged 1 commit from issue-549-gradle-daemon-lock into main 2026年06月10日 13:13:33 +02:00
Collaborator
Copy link

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)
fix(ci): stop gradle daemon between flutter build apk and assembleAndroidTest
All checks were successful
CI / Full Project Check (pull_request) Successful in 3m27s
7239036c8e
`flutter build apk --debug --no-pub` spawns a Gradle daemon whose journal
cache lock file lives on the persistent Dagger `gradle-cache` mount. When
the WithExec finishes, Dagger tears the container down and force-kills the
daemon, but the lock file remains with its now-dead PID. The next exec —
`./gradlew --no-daemon app:assembleAndroidTest` — then times out after 60s
waiting for that stale lock, failing the Firebase Test Lab build with:
 > 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 existing `--no-daemon` on the second exec only prevented daemon-registry
reuse, not stale lock files. Chain `./gradlew --stop` into the first exec so
the daemon shuts down gracefully and releases its locks before Dagger
snapshots the layer.
Closes #549
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
guettli deleted branch issue-549-gradle-daemon-lock 2026年06月10日 13:13:34 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
automerge
Eligible for automatic merge by CI
ci-failure
Issue opened by agentloop to track a failing CI workflow; used for deduplication.
do-not-merge
Plan PR — review only, do not merge.
loop
code
Add to run the built-in "code" prompt; override at prompts/code.md.
loop/code-ci-pending
Prompt "code" finished; waiting for the PR's CI to pass before advancing.
loop
code-done
Prompt "code" finished successfully.
loop/code-in-process
Agent for the "code" prompt is currently running on this issue.
loop/merge
Managed by agentloop
loop/merge-done
Managed by agentloop
loop/merge-in-process
Managed by agentloop
loop
plan
Add to run the built-in "plan" prompt; override at prompts/plan.md.
loop
plan-done
Prompt "plan" finished successfully.
loop/plan-in-process
Agent for the "plan" prompt is currently running on this issue.
NeedSupervisor
Issue escalated to a human supervisor; agentloop will skip it until cleared.
State
InProgress
State
Later
State
Planned
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
guettli/sharedinbox!554
Reference in a new issue
guettli/sharedinbox
No description provided.
Delete branch "issue-549-gradle-daemon-lock"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?