Skip to content

Commit 0625260

Browse files
alome007Daniel-ADFA
authored andcommitted
ADFA-2602: Address review on the asset-zip workflow
Three findings from @jatezzz on #1815: - The content gate checked seven entries and skipped exactly the two whose filenames encode the Gradle version, so a constants.kt bump without the matching createAssetsZip/Asset() rename would publish an 8.14.3 payload to assets/9.6.1/ with a Slack line claiming 9.6.1 -- the mislabel this PR exists to prevent. Gate on the interpolated names as well. - The ~/.ssh/id_rsa hazard the PR body describes spans runs, not just matrix legs: two overlapping dispatches let one run's Cleanup ssh fire during the other's scp. Added a top-level concurrency group with cancel-in-progress: false, since cancelling mid-scp would leave the key and partial staging on the shared runner. - The artifact round-trip re-compressed an already-compressed payload and shipped each leg the other ABI's assets. Measured: the artifact was 1,484,450,451 bytes against ~1,590 MB of input, so compression bought ~6.7% -- documentation.db does not compress either, because its content blobs are already brotli-encoded. Now compression-level: 0, and the staging splits into a common artifact plus one per ABI, so each leg no longer downloads the other ABI's ~431 MB. Claude-Session: https://claude.ai/code/session_017HGpMsUzZ5wxCfMtDZ2HGP
1 parent 9d74b31 commit 0625260

1 file changed

Lines changed: 45 additions & 6 deletions

File tree

.github/workflows/generate_assets.yml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ on:
3535
required: false
3636
default: adfa-2602-rc
3737

38+
concurrency:
39+
group: generate-assets
40+
cancel-in-progress: false
41+
3842
env:
3943
SCP_HOST: ${{ vars.GREENGEEKS_SSH_HOST }}
4044

@@ -244,11 +248,37 @@ jobs:
244248
|| { echo "ERROR: documentation.db predates the templateId column; docs requests will 500"; exit 1; }
245249
echo "All ingredients staged"
246250
247-
- name: Upload staged assets
251+
- name: Upload staged assets (ABI-independent)
248252
uses: actions/upload-artifact@v4
249253
with:
250-
name: debug-assets
251-
path: assets/
254+
name: debug-assets-common
255+
path: |
256+
assets/
257+
!assets/android-sdk-*.zip
258+
!assets/bootstrap-*.zip
259+
compression-level: 0
260+
retention-days: 1
261+
if-no-files-found: error
262+
263+
- name: Upload staged assets (v8)
264+
uses: actions/upload-artifact@v4
265+
with:
266+
name: debug-assets-v8
267+
path: |
268+
assets/android-sdk-arm64-v8a.zip
269+
assets/bootstrap-arm64-v8a.zip
270+
compression-level: 0
271+
retention-days: 1
272+
if-no-files-found: error
273+
274+
- name: Upload staged assets (v7)
275+
uses: actions/upload-artifact@v4
276+
with:
277+
name: debug-assets-v7
278+
path: |
279+
assets/android-sdk-armeabi-v7a.zip
280+
assets/bootstrap-armeabi-v7a.zip
281+
compression-level: 0
252282
retention-days: 1
253283
if-no-files-found: error
254284

@@ -317,10 +347,16 @@ jobs:
317347
run: |
318348
echo "$GOOGLE_SERVICES_JSON" > app/google-services.json
319349
320-
- name: Download staged assets
350+
- name: Download staged assets (ABI-independent)
351+
uses: actions/download-artifact@v4
352+
with:
353+
name: debug-assets-common
354+
path: assets
355+
356+
- name: Download staged assets (this ABI)
321357
uses: actions/download-artifact@v4
322358
with:
323-
name: debug-assets
359+
name: debug-assets-${{ matrix.abi }}
324360
path: assets
325361

326362
- name: Assemble assets zip
@@ -344,6 +380,8 @@ jobs:
344380
345381
- name: Verify assets zip
346382
id: assets_zip
383+
env:
384+
GRADLE_VERSION: ${{ steps.toolchain.outputs.GRADLE_VERSION }}
347385
run: |
348386
zip_path="app/build/outputs/assets/assets-${{ matrix.arch }}.zip"
349387
if [ ! -s "$zip_path" ]; then
@@ -352,7 +390,8 @@ jobs:
352390
fi
353391
unzip -tq "$zip_path"
354392
for entry in android-sdk.zip bootstrap.zip localMvnRepository.zip documentation.db \
355-
core.cgt plugin-artifacts.zip plugin-maven-repo.zip; do
393+
core.cgt plugin-artifacts.zip plugin-maven-repo.zip \
394+
"gradle-$GRADLE_VERSION-bin.zip" "gradle-api-$GRADLE_VERSION.jar.zip"; do
356395
unzip -l "$zip_path" | grep -qE "[[:space:]]$entry$" \
357396
|| { echo "ERROR: $zip_path is missing entry $entry"; exit 1; }
358397
done

0 commit comments

Comments
 (0)