Fix ad-hoc signed build dying during APK extraction - #1867
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe signed build workflow now frees disk space, relocates bundles without duplication, stops Gradle daemons, configures bundletool memory, removes intermediate artifacts, and reports disk and memory usage. ChangesSigned build workflow
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The workflow frees runner resources and removes temporary build files while preserving the existing signed APK outputs and uploads. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description clearly explains the failure, cause, and implemented changes. However, it does not provide the required recording, does not select a Type of Change, and does not complete the required checklist items. Resolution Add a short recording or GIF, select the applicable Type of Change (at least Bug fix and/or Performance / stability improvement), and complete each checklist item with the required approvals or context. Include confirmation that the contribution guidelines were reviewed. Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".github/workflows/adhoc-signed-build.yml">
<violation number="1" location=".github/workflows/adhoc-signed-build.yml:113">
P3: The three bundletool build-apks + unzip + rm blocks in the Extract APKs step are near-identical except for the bundle/output file names (and unzip -o vs -p). Since this exact pattern has now been changed once (heap, mv, per-bundle cleanup) and is duplicated across two other workflows (app-release-signed.yml, tagged-release.yml), collapse it into a loop over the bundle pairs so future heap/cleanup changes are made in one place rather than three.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| @@ -15,6 +15,11 @@ jobs: | |||
| if: github.actor == 'utkarshdalal' | |||
There was a problem hiding this comment.
P3: The three bundletool build-apks + unzip + rm blocks in the Extract APKs step are near-identical except for the bundle/output file names (and unzip -o vs -p). Since this exact pattern has now been changed once (heap, mv, per-bundle cleanup) and is duplicated across two other workflows (app-release-signed.yml, tagged-release.yml), collapse it into a loop over the bundle pairs so future heap/cleanup changes are made in one place rather than three.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/adhoc-signed-build.yml, line 113:
<comment>The three bundletool build-apks + unzip + rm blocks in the Extract APKs step are near-identical except for the bundle/output file names (and unzip -o vs -p). Since this exact pattern has now been changed once (heap, mv, per-bundle cleanup) and is duplicated across two other workflows (app-release-signed.yml, tagged-release.yml), collapse it into a loop over the bundle pairs so future heap/cleanup changes are made in one place rather than three.</comment>
<file context>
@@ -91,18 +96,28 @@ jobs:
+ java -Xmx3g -jar tools/bundletool-all-1.17.2.jar build-apks --bundle=app-release.aab --output=app-release.apks --mode=universal
unzip -o app-release.apks universal.apk
- java -jar tools/bundletool-all-1.17.2.jar build-apks --bundle=app-modern-release.aab --output=app-modern-release.apks --mode=universal
+ rm app-release.apks app-release.aab
+ java -Xmx3g -jar tools/bundletool-all-1.17.2.jar build-apks --bundle=app-modern-release.aab --output=app-modern-release.apks --mode=universal
unzip -p app-modern-release.apks universal.apk > universal-modern.apk
</file context>
Every ad-hoc build since late July has failed with "The runner has received a shutdown signal" a few seconds into the first bundletool build-apks call - the hosted runner VM is running out of disk/memory right when bundletool starts, since the three release bundles plus gradle intermediates and resident daemons are all still around at that point.
Changes:
Summary by cubic
Fixes ad-hoc signed builds dying with "The runner has received a shutdown signal" during the first bundletool call by freeing up disk and memory on the hosted runner before and during extraction.
Bug Fixes
dotnet,ghc, CodeQL,boost,swift) and stops Gradle daemons before extraction.mvinstead ofcpso only one copy of each ~600MB AAB exists..apks/.aabonce its universal APK is extracted.df/freediagnostics around extraction so the next failure shows which resource ran out.Written for commit 067ba7a. Summary will update on new commits.
Summary by CodeRabbit
Chores
Refactor