Repository navigation
ci: install the Android SDK through one setup-android-sdk action - #4400
Conversation
Six copies of the sdkmanager install handled the `yes` SIGPIPE three ways (one hid real licence failures with `|| true`) and the build-tools version was written nine times. The new composite action owns the version (input `build-tools`), exports AGENT_DEVICE_ANDROID_BUILD_TOOLS, and outputs `build-tools-dir`. The fixture APK scripts read the exported version; a local repack outside CI takes the newest installed build tools. A repo guard keeps the version and sdkmanager inside the action. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qAu53rMak1bXMuR5U2gF4
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
setup-android-sdk skipped sdkmanager when aapt and apksigner existed, but the helper build also runs aapt2, d8, and zipalign. The repack script's newest-version lookup exited silently under pipefail when the build-tools directory was missing; it now reaches its own diagnostic. The repack test covers version ordering (9.0.0, 35.0.1, 36.0.0) and a missing directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016qAu53rMak1bXMuR5U2gF4
Apex SentinelVerdict: No findings. 1 finding below Reviewed with this repository's own Sentinel configuration ( Feedback goes in the review comment threads, as a reply under the inline comment of a finding: Reply Useful? Reply Comment |
|
This PR is ready: I found no problems in the code at 819d1dd, and all 28 checks are passing. There are no conflicts, and it can merge on a maintainer decision. Not blocking, and fine to take or leave: the new fallback to the newest installed build-tools directory in repack-android-apk.sh was not requested (a local repack could require AGENT_DEVICE_ANDROID_BUILD_TOOLS, or keep the old 36.0.0 default, and drop the sort -V test case), and the licence-failure guard in android-sdk-setup-action.test.ts matches source text, so it could run the install step against a stub sdkmanager that exits non-zero. I did not run the CI jobs or the local tests, so the nested local action use and the env-based key after GITHUB_ENV are inferred from the green checks. |
Summary
TOOL2-5 (refs #4368). The sdkmanager install existed in six copies. They handled the
yesSIGPIPE three different ways, and one of them (|| true) hid real licence failures. The build-tools version36.0.0, which decides the helper APK bytes, was written nine times.A new composite action,
.github/actions/setup-android-sdk, now owns the version through itsbuild-toolsinput. It exportsAGENT_DEVICE_ANDROID_BUILD_TOOLS, outputsbuild-tools-dir, and installs only when a build-tools binary a caller runs (aapt aapt2 d8 zipalign apksigner) or the platform jar is missing. All six sites call it.The fixture APK scripts read the exported version. A local repack outside CI uses the newest installed build-tools, and it refuses to run without the version when
CI=true.A repo guard keeps the version and sdkmanager inside the action. 12 files.
Validation
819d1dd.check:quickandcheck:fallow --base origin/mainpass, and so do the new guard andtest:fixture-cache(16/16, including build-tools version ordering and a missing SDK).2295200:check:affectedstopped at the 2 known container-onlysmoke-daemon-cleanfailures, and every remaining gate passed when run on its own.819d1ddtouches only the action's readiness check, the repack script and its test.android.yml,size.ymlandtest-app-build-cache.yml(Android leg).release.ymlandrelease-android-snapshot-helper.ymlrun only after merge, so the next release run is their first proof.workflow_dispatchof the snapshot-helper workflow with acheckout_refolder than this action fails, because the action does not exist at that ref.Generated by Claude Code
<a href="
https://backend.blacksmith.sh/track/enable-autofix?expires=1796966815&installation_model_id=447842&pr_number=4400&ref=codesmith_pr_footer&repository=callstack%2Fagent-device&return_to=https%3A%2F%2Fgithub.com%2Fcallstack%2Fagent-device%2Fpull%2F4400&signature=3c7dbb95da9da01e1adcc23d3c07df48dac44735b450e18e918d560c4e67f04f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png" width="190" height="28">Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.<source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg">https://www.cubic.dev/action/auto-fix/pr/callstack/agent-device/4400?returnTo=https%3A%2F%2Fgithub.com%2Fcallstack%2Fagent-device%2Fpull%2F4400&source=description"target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg">Generated by Claude Code