Skip to content

ADFA-6957: Skip advzip on CI builds of branches other than stage - #2318

Merged
davidschachterADFA merged 3 commits into
stagefrom
ci/ADFA-6957-skip-advzip-on-branches
Nov 27, 2026
Merged

davidschachterADFA merged 3 commits into
stagefrom
ci/ADFA-6957-skip-advzip-on-branches

Conversation

@davidschachterADFA

@davidschachterADFA davidschachterADFA commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

ADFA-6957

Step 2 of the ADFA-6953 CI speed-up plan: only stage builds and release builds run advzip -3 now.

What changes

  • recompressApk in app/build.gradle.kts runs advzip for release APKs, and for debug APKs only when Gradle gets -Padvzip.
    • That property is read the same way as the existing -Pzopfli. Only its presence counts.
    • Without it, the APK is compressed by the Deflater BEST_COMPRESSION path, which local builds already use. The jar assets stay deflated (ADFA-4188); only the final 7z-level pass is skipped.
    • When it skips, the task logs Skipping advzip: ....
  • .github/workflows/debug.yml passes -Padvzip only when the branch is stage, and installs advancecomp only then.

Stage builds published to App Tester keep advzip. Feature-branch builds skip it, and so do the scheduled analyze.yml and instrumentation-test.yml builds, whose APKs nobody installs. Those two workflows need no change: they skip advzip because they don't pass -Padvzip, though they build stage. Release builds (release.yml) keep advzip because their build type is release. That workflow installs advancecomp itself, and the 2026-11-25 release run (45610420469) logged Compressing 1968 entries with advzip -3 for both APKs.

Why

The advzip pass was the largest single step in the Universal APK job: 209 s in a normal stage build (run 45716776726), and 307 s in an ADFA-6956 measurement run. The size cost is small:

APK Bytes
With advzip (ADFA-6956 run 45761026069) 77,080,750
Predicted without it (each deflated entry recompressed with zlib level 9) about 79,965,400 (+3.74%)
Measured without it (this PR's run 45763215760) 79,964,334 (+3.74%)

The limit agreed on ADFA-6953 was 5%.

Results (run 45763215760, first commit)

  • The log shows Skipping advzip: ..., and recompressApk completed in 21063ms, against 209 to 307 s with advzip.
  • The assemble step took 256 s, against 458 s in the stage baseline.
  • The Firebase App Distribution upload step succeeded. I did not install this APK on a device.

Final commit (run 45764362108): the log shows Skipping advzip: only release APKs and builds with -Padvzip use it (ADFA-6957), and recompressApk completed in 21112ms. The assemble step took 255 s, the "Install advancecomp" step was skipped, and the APK is again 79,964,334 bytes.

Verification

  • actionlint and shellcheck are clean.
  • I dry-ran the assemble step with a stub flox. With GITHUB_REF_NAME=stage it passes -Padvzip to Gradle, and with any other branch it passes nothing.
  • An independent AI review checked every path that reaches recompressApk: release.yml (always advzip), debug.yml on stage and on other branches, the scheduled analyze and instrumentation builds, standalone -PrecompressAbi runs, and local assembles. It also checked the Deflater path's output: the same signed and aligned structure, only the compressed bytes differ. It found nothing blocking. Its two suggestions, the -Padvzip opt-in and installing advancecomp only on stage, are in this PR.
  • Not verified before merge: that stage still runs advzip. A PR can't run as stage. The first stage build after merge should log Compressing N entries with advzip -3, and I'll check that log.

Sites checked

isCiCd is used elsewhere in app/build.gradle.kts, for the assemble finalizers and the asset downloads. Those decide whether recompressApk runs at all, not how it compresses, so they are unchanged. ARCHITECTURE.md says recompressApk runs for "release always, debug in CI only", which is still true.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Vh2DAXGyHbMzjSsi2zbrkw


Code Reviewer: Code Reviewer couldn't review this pull request
The pull request author does not have access to AI for the associated Atlassian organization.

davidschachterADFA and others added 2 commits November 25, 2026 21:39
Step 2 of the ADFA-6953 plan. recompressApk ran advzip -3 on every CI
build. On the Universal APK job that pass took 209 s in a normal stage
build and 307 s in an ADFA-6956 measurement run, the largest single
cost in the job.

advzip now runs only for release APKs and for CI builds of stage, which
most testers install. Feature-branch and PR builds use the Deflater
BEST_COMPRESSION path that local builds and advzip-less machines
already use. The jar assets stay deflated (ADFA-4188); only the final
7z-level pass is skipped.

Size cost, measured on a current CI debug APK (ADFA-6956 run
45761026069, recompressing each deflated entry with zlib level 9, the
Deflater path's settings): 77,080,750 bytes with advzip, about 2.88 MB
(+3.74%) more without it. The agreed limit was 5%.

recompressApk now logs a line when it skips advzip, so the CI log shows
which path ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAXGyHbMzjSsi2zbrkw
From the independent review: keying advzip on GITHUB_REF_NAME in the
build script also kept it in the scheduled analyze and instrumentation
builds, which build stage, though nobody installs those APKs. The
workflow that publishes the APK now opts in instead.

- recompressApk runs advzip for release APKs and for builds run with
  -Padvzip, read the same way as the existing -Pzopfli. No branch name
  in the build script.
- debug.yml passes -Padvzip only when GITHUB_REF_NAME is stage, and
  installs advancecomp only then.

So stage builds published to App Tester keep advzip, while branch builds
and the scheduled analyze and instrumentation builds skip it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAXGyHbMzjSsi2zbrkw
@davidschachterADFA
davidschachterADFA marked this pull request as ready for review November 26, 2026 06:00

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: a76f9ae2-f8a0-4b0e-ad91-069726e769e0
Commits

Reviewing files that changed from the base of the PR and between b58befe and 9645bc6.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

  • Adds -Padvzip gating for advzip -3 in APK recompression. Release APKs still use advzip.
  • debug.yml: installs advancecomp only when github.ref_name == 'stage'. The assemble step passes -Padvzip only when GITHUB_REF_NAME is stage.
  • app/build.gradle.kts: useAdvzip = buildName == "release" || project.hasProperty("advzip"). Logs a skip message otherwise. The isCiCd condition is removed.
  • Measured effect (author-reported): APK 79,964,334 bytes (+3.74%). recompressApk about 21 s without advzip, 209–307 s with it.
  • Risk: the gate uses branch name in debug.yml. The commit history says the approach moved away from branch-keyed logic. Scheduled builds of stage will run advzip.
  • Risk: the stage path is not verified. The first stage build after merge should log Compressing N entries with advzip -3.
  • Risk: the APK was not device-tested.
  • Risk: the diff does not match the objectives' claim that analyze.yml and instrumentation-test.yml skip advzip. Those files are not in this diff.

The debug workflow installs advancecomp and passes -Padvzip only for the stage ref. Gradle uses advzip for release APKs or when the property is set. Other builds skip advzip and log a message.

Changes: APK recompression

Layer / File(s) Summary
Stage-only advzip setup
.github/workflows/debug.yml, app/build.gradle.kts
The workflow installs advancecomp and passes -Padvzip only for the stage ref. Gradle uses advzip for release APKs or when the property is set. Otherwise, it skips advzip and logs a message.

Estimated code review effort: 2 (Simple) | ~8 minutes

Suggested reviewers: jomen-adfa, hal-eisen-adfa

Merge Risk: Minimal · previous review b58be

This change limits APK recompression with advzip to stage builds and release APKs, which speeds up CI for other builds. APK size for non-stage builds grows by about 3.7%, within the agreed limit. No merge-blocking risk remains; check the first stage build after merge to confirm advzip still runs.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: advzip is skipped on CI builds of branches other than stage, which matches the build script and workflow changes. It also carries the ADFA-6957 ticket key. The title i…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is directly related to the changeset. It names the Jira tickets, states that release APKs and debug APKs passed with -Padvzip now use advzip, and describes the debug.yml change that pa…
Full details: Title check

Explanation

The title names the main change: advzip is skipped on CI builds of branches other than stage, which matches the build script and workflow changes. It also carries the ADFA-6957 ticket key. The title is short and specific.

Full details: Description check

Explanation

The description is directly related to the changeset. It names the Jira tickets, states that release APKs and debug APKs passed with -Padvzip now use advzip, and describes the debug.yml change that passes -Padvzip and installs advancecomp only on stage. It also gives size and timing measurements, the verification steps, and one unverified item: that stage still runs advzip after merge.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the stage-bound build,
Where advzip waits until it’s willed.
Release APKs still take the route,
Other builds skip and hop about.
The workflow keeps each step in view.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: f148042c-244d-4ff4-82b8-02b89b4710a4
Commits

Reviewing files that changed from the base of the PR and between b0f479e and b58befe.

Files selected for processing: 2

  • .github/workflows/debug.yml
  • app/build.gradle.kts

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 2 remain after this review.

Brings #2318 up to date with stage (1cd37e7) so it can merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAXGyHbMzjSsi2zbrkw
@davidschachterADFA
davidschachterADFA merged commit ef7f6d8 into stage Nov 27, 2026
5 checks passed
@davidschachterADFA
davidschachterADFA deleted the ci/ADFA-6957-skip-advzip-on-branches branch November 27, 2026 19:02
davidschachterADFA added a commit that referenced this pull request Nov 27, 2026
Resolves the conflict with #2318 (ADFA-6957) in debug.yml: this branch
moved the four check steps out of the build job into the checks job, and
#2318 added a comment above the advzip step next to them. The build job
keeps #2318's comment, its stage-only advancecomp install and its
-Padvzip logic, and not the four steps, which stay in the checks job.
The PR's own diff against stage is the same as before the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vh2DAXGyHbMzjSsi2zbrkw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants