Compare commits

...
Author SHA1 Message Date
Thomas SharedInboxandClaude Sonnet 4.6 dcb0cbd539 fix(android): prevent Gradle daemon hang in Firebase test build (#155)
Dagger preserves filesystem snapshots between WithExec steps but kills
background processes. After `flutter build apk --debug` completes, the
Gradle daemon registry file remains in /home/ci/.gradle/daemon/ while
the daemon process itself is gone. The subsequent `./gradlew
app:assembleAndroidTest` step finds the stale registry entry, tries to
connect to the dead daemon, and hangs.

Fix by:
- Adding --no-daemon to the assembleAndroidTest gradlew call so it runs
  in-process and never consults the daemon registry.
- Mounting the gradle-cache volume (same as Base()) so dependencies are
  cached between runs rather than re-downloaded from scratch each time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 15:41:24 +02:00
Thomas SharedInboxandClaude Sonnet 4.6 f7e0ffd4d5 docs: explain why continue-on-error is intentional on deploy steps (#154)
The deploy steps that require SSH_PRIVATE_KEY are best-effort: if the
secret is not set the task precondition fails and the step appears
failed/orange in the UI, but the overall job remains green because of
continue-on-error: true.  This confused issue #154.  Add inline
comments to each affected step explaining that this behavior is
intentional.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 15:27:52 +02:00
2 changed files with 15 additions and 1 deletions
+11
View File
@@ -74,6 +74,10 @@ jobs:
run: task publish-android
- name: Build & Deploy APK to server
# continue-on-error: step requires SSH_PRIVATE_KEY secret; if unset the task
# precondition fails, but we don't want that to fail the whole job — the Play
# Store publish above already succeeded. The overall job stays green even
# though this step shows as failed/orange in the UI.
continue-on-error: true
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
@@ -113,6 +117,11 @@ jobs:
run: scripts/setup_dagger_remote.sh
- name: Build & Deploy Linux to server
# continue-on-error: step requires SSH_PRIVATE_KEY secret; if unset the task
# precondition fails, but the build step that precedes this (done via Dagger)
# already succeeded. Deployment is best-effort; a missing secret should not
# turn the job red. The step will show as failed/orange in the UI even though
# the overall job is green — this is intentional.
continue-on-error: true
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
@@ -154,6 +163,8 @@ jobs:
run: scripts/setup_dagger_remote.sh
- name: Generate build history and deploy website
# continue-on-error: website publish is best-effort; a missing SSH_PRIVATE_KEY
# should not block the overall workflow status.
continue-on-error: true
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
+4 -1
View File
@@ -649,9 +649,12 @@ func (m *Ci) DeployApk(
// Returns a flat directory with app-debug.apk and app-debug-androidTest.apk.
func (m *Ci) BuildAndroidDebugApks() *dagger.Directory {
built := m.setup(m.firebaseSrc()).
WithMountedCache("/home/ci/.gradle", dag.CacheVolume("gradle-cache"), dagger.ContainerWithMountedCacheOpts{Owner: "ci"}).
WithExec([]string{"flutter", "build", "apk", "--debug", "--no-pub"}).
WithWorkdir("/src/android").
WithExec([]string{"./gradlew", "app:assembleAndroidTest"}).
// --no-daemon avoids connecting to a stale daemon whose registry file was
// preserved in the Dagger layer snapshot but whose process no longer exists.
WithExec([]string{"./gradlew", "--no-daemon", "app:assembleAndroidTest"}).
WithWorkdir("/src").
WithExec([]string{"/bin/bash", "-c",
`apk=$(find /src -path "*androidTest*" -name "*.apk" -type f 2>/dev/null | head -1) && \