android-ci: make a :app:packageRelease failure diagnosable (--stacktrace) #115

Merged
sirius merged 1 commit from onionwire/t_d81fb7bf-android-ci-make-a-app-packagerelease-fai into main 2026-09-19 00:03:08 +00:00
Owner

Run 414 (294cedf, PR #114) died in :app:packageRelease with a cause-less
Gradle failure:

> Task :app:packageRelease FAILED
* What went wrong:
Execution failed for task ':app:packageRelease'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable

No Caused by: line, nothing else — Gradle's default console output dropped the
exception chain, so the root cause of a one-off packaging failure is
unrecoverable after the fact. Runs 412/413 packaged the identical tree green and
417/418 are green too, so there is nothing to bisect: the missing thing is the
throwable, not a fix.

Change

One flag on the single ./gradlew invocation in
scripts/build-android-local.sh:

-( cd android && "./gradlew" --no-daemon \
+( cd android && "./gradlew" --no-daemon --stacktrace \
  • --stacktrace only changes output on failure. It does not alter the build,
    the artifact, or the timings.
  • scripts/build-android-local.sh is the one gradle command
    .forgejo/workflows/android-ci.yml and .forgejo/workflows/android-release.yml
    both build through, so every future packaging failure is diagnosable in both.
    The release path getting it too is desirable.
  • Not switching to --info/--debug: run 417's log is already 3421 lines with
    -eux shell tracing on top. A stack trace is what is missing, not verbosity.

Scope: that one script. No Rust core, no scripts/publish-release.sh, no
workflow files.

Verification

android-ci runs on this PR — its pull_request paths filter includes
scripts/build-android-local.sh, so the job builds the real
:sdk:assembleRelease + :app:assembleRelease through the edited line (debug
signing, nothing published). Run link to follow in a comment.

Run 414 (`294cedf`, PR #114) died in `:app:packageRelease` with a cause-less Gradle failure: ``` > Task :app:packageRelease FAILED * What went wrong: Execution failed for task ':app:packageRelease'. > A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable ``` No `Caused by:` line, nothing else — Gradle's default console output dropped the exception chain, so the root cause of a one-off packaging failure is unrecoverable after the fact. Runs 412/413 packaged the identical tree green and 417/418 are green too, so there is nothing to bisect: the missing thing is the throwable, not a fix. ## Change One flag on the single `./gradlew` invocation in `scripts/build-android-local.sh`: ```diff -( cd android && "./gradlew" --no-daemon \ +( cd android && "./gradlew" --no-daemon --stacktrace \ ``` - `--stacktrace` only changes output on failure. It does not alter the build, the artifact, or the timings. - `scripts/build-android-local.sh` is the one gradle command `.forgejo/workflows/android-ci.yml` and `.forgejo/workflows/android-release.yml` both build through, so every future packaging failure is diagnosable in both. The release path getting it too is desirable. - Not switching to `--info`/`--debug`: run 417's log is already 3421 lines with `-eux` shell tracing on top. A stack trace is what is missing, not verbosity. Scope: that one script. No Rust core, no `scripts/publish-release.sh`, no workflow files. ## Verification `android-ci` runs on this PR — its `pull_request` paths filter includes `scripts/build-android-local.sh`, so the job builds the real `:sdk:assembleRelease + :app:assembleRelease` through the edited line (debug signing, nothing published). Run link to follow in a comment.
android-ci: pass --stacktrace to the release gradle build
All checks were successful
android-ci / android (pull_request) Successful in 10m27s
fcdabf8d13
Run 414 died in :app:packageRelease with an empty cause chain (no
Caused by: line at all), so a one-off packaging failure leaves nothing
to diagnose. --stacktrace only changes output on failure; it does not
alter the build, the artifact or the timings.

scripts/build-android-local.sh is the single gradle invocation that both
android-ci.yml and android-release.yml build through, so one flag covers
both.
sirius merged commit 77f577fcf9 into main 2026-09-19 00:03:08 +00:00
Author
Owner

Verification: android-ci run 419 green on this head

https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/419 — android-ci / android (pull_request), success, head fcdabf8d139bde025e968b1cb7a2f447df5bbf33.

The pull_request paths filter on scripts/build-android-local.sh fires here, so the
job built the edited line for real:

==> android build: version 0.1.0 (versionCode 100), abi arm64-v8a
BUILD SUCCESSFUL in 7m 24s
96 actionable tasks: 57 executed, 39 from cache

Artifacts (unchanged by the flag):

artifact bytes sha256
onionwire-0.1.0-android-arm64-v8a.apk 34445598 d829d4969af9bd080eac16231e653be3a58bef13efbf09dabd890dbe46760b65
onionwire-sdk-0.1.0.aar 15728122 b2c016c71387bad186e8bc5f6cc75d32fdc540f525d7a1443fce82078372f99c (byte-identical to runs 417/418)

Signer is the debug cert as expected for a verification build:
C=US, O=Android, CN=Android Debug, cert SHA-256 45f4a962…; aapt reports
com.siriusdevops.onionwire versionCode='100' versionName='0.1.0' sdkVersion:'26' targetSdkVersion:'36'.

What this does and does not prove

  • Proven: the tree at fcdabf8 (which is the tree this run checked out — log line 195,
    HEAD is now at fcdabf8) packages green with the flag in place, at the same byte sizes
    as the green 418 baseline. Local ./gradlew --no-daemon --stacktrace help on Gradle
    8.14.5 succeeds too, so the flag is accepted by this Gradle/AGP.
  • Not proven from the log alone: the script runs with set -euo pipefail and no -x, so
    the job log does not echo the ./gradlew command line. The flag's presence is evidenced
    by the checkout sha plus git show fcdabf8:scripts/build-android-local.sh line 62:
    ( cd android && "./gradlew" --no-daemon --stacktrace \.
  • The one thing that cannot be demonstrated without another real failure is that the next
    cause-less :app:packageRelease now prints a Caused by: chain — that is the flag's
    designed behaviour, and the next occurrence of run 414's failure mode is the proof.
## Verification: android-ci run 419 green on this head https://forgejo.siriusdevops.com/sirius/onionwire/actions/runs/419 — `android-ci / android (pull_request)`, **success**, head `fcdabf8d139bde025e968b1cb7a2f447df5bbf33`. The `pull_request` paths filter on `scripts/build-android-local.sh` fires here, so the job built the edited line for real: ``` ==> android build: version 0.1.0 (versionCode 100), abi arm64-v8a BUILD SUCCESSFUL in 7m 24s 96 actionable tasks: 57 executed, 39 from cache ``` Artifacts (unchanged by the flag): | artifact | bytes | sha256 | | --- | --- | --- | | `onionwire-0.1.0-android-arm64-v8a.apk` | 34445598 | `d829d4969af9bd080eac16231e653be3a58bef13efbf09dabd890dbe46760b65` | | `onionwire-sdk-0.1.0.aar` | 15728122 | `b2c016c71387bad186e8bc5f6cc75d32fdc540f525d7a1443fce82078372f99c` (byte-identical to runs 417/418) | Signer is the debug cert as expected for a verification build: `C=US, O=Android, CN=Android Debug`, cert SHA-256 `45f4a962…`; `aapt` reports `com.siriusdevops.onionwire versionCode='100' versionName='0.1.0' sdkVersion:'26' targetSdkVersion:'36'`. ### What this does and does not prove - Proven: the tree at `fcdabf8` (which is the tree this run checked out — log line 195, `HEAD is now at fcdabf8`) packages green with the flag in place, at the same byte sizes as the green 418 baseline. Local `./gradlew --no-daemon --stacktrace help` on Gradle 8.14.5 succeeds too, so the flag is accepted by this Gradle/AGP. - Not proven from the log alone: the script runs with `set -euo pipefail` and no `-x`, so the job log does not echo the `./gradlew` command line. The flag's presence is evidenced by the checkout sha plus `git show fcdabf8:scripts/build-android-local.sh` line 62: `( cd android && "./gradlew" --no-daemon --stacktrace \`. - The one thing that cannot be demonstrated without another real failure is that the next cause-less `:app:packageRelease` now prints a `Caused by:` chain — that is the flag's designed behaviour, and the next occurrence of run 414's failure mode is the proof.
Sign in to join this conversation.
No reviewers
No milestone
No project
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
sirius/onionwire!115
No description provided.