Skip to content

Run the verify-pr Android steps once on a Linux runner #7123

Done

Description

@antonis

Goal

Every verification so far ran on a Mac with an arm64 emulator. Before building the CI workflow, find out how the same steps behave on a Linux runner.

What to do

Add a throwaway workflow_dispatch job, on a branch, that:

  1. Copies the emulator setup from the Android test job in sample-application.yml (ubuntu-latest, KVM, reactivecircus/android-emulator-runner), but with a full emulator image instead of the ATD image.
  2. Builds the sample app without fix(core): Remove native scope tags set to an empty value #7087 (the PR's SDK change reverse-applied) and runs the skill's example flow with run tags.
  3. Builds it with fix(core): Remove native scope tags set to an empty value #7087 and runs the same flow.
  4. Uploads the device logs and screenshots.

Then check both runs' events in the sentry-sdks org by hand or with the local skill.

Then have Junior start it

Once the job works, ask Junior to start it with gh workflow run, set a timer, and report the result when the run ends. Junior's own check showed the command is supported but untested here, and that a dispatched run sends it no event, so it has to use a timer and gh run view. This one request proves both.

What to record

  • Time for the clean build, the incremental build, each run, and the whole job.
  • Whether screenshots are usable with a full image, and how much longer it takes to boot than the ATD image.
  • Free disk on the runner before and after.
  • Every command from the skill that needed changing for Linux (for example the disk check uses a macOS path).
  • Whether the stale-bundle check works on the runner.
  • Whether Junior could start the job, and how long after the run ended it reported back.

Done when

Not in this issue

  • The real workflow, its inputs, or anything Junior does.
  • iOS.

The job and its branch are deleted afterwards. It holds no secrets.

Activity

  1. self-assigned this
    on Nov 26, 2026
  2. linear-code commented on Nov 26, 2026

    @linear-code
  3. antonis commented on Nov 27, 2026

    @antonis
    ContributorAuthor

    Plan

    All changes are in this repo, and none of them needs merging.

    Part Needs a merge? How
    Build and run #7087 both ways on a Linux runner No A new workflow file on a branch
    Check the two events in sentry-sdks No Locally
    Junior starts a workflow and reports back by timer No An existing dispatchable workflow

    The Linux run: a branch is enough

    Add the throwaway workflow file on a branch, with a push trigger limited to that branch. GitHub runs a new workflow file from the branch it is pushed to, so it runs on every push without being on main.

    No PR is needed. A draft PR would also start the repo's other PR workflows on every push. The branch is deleted at the end.

    The Junior test: an existing workflow

    gh workflow run only works for workflows on the default branch, so Junior can't start the throwaway job. The test doesn't need it to: it has to show that Junior can start a workflow here and report back when it ends.

    ios-crash-screenshot-no-freeze.yml fits. It is on main, has a workflow_dispatch trigger with no inputs, only builds and checks, and its recent runs took 12 to 20 minutes. It costs one macOS runner for that time.

    The other two dispatchable workflows, release.yml and release-comment-issues.yml, are for releases and must not be used for this.

    Order

    1. Ask Junior to start ios-crash-screenshot-no-freeze.yml and report when it finishes. This can happen now.
    2. Do the Linux run on a branch.
    3. Record both results here.

    When a merge becomes necessary

    In #7127. That test has Junior start the verification job itself on main with a branch as an input, and it uses the SENTRY_AUTH_TOKEN secret in the fetch job. Both need the workflow file on main.

  4. antonis commented on Nov 27, 2026

    @antonis
    ContributorAuthor

    Results of the first Linux run

    Run 45988566306, from the throwaway workflow in #7128, on ubuntu-latest. It passed on the first try, and both flows passed.

    Timings

    Step Time
    Whole job 13 min 45 s
    Clean build, without #7087 6 min 17 s
    Incremental build, with #7087 32 s
    Emulator boot 91 s
    Run without the change 92 s
    Run with the change 69 s

    The clean build had a warm Gradle cache, restored from main.

    What the run shows

    • The difference is reproduced. The device log of the "without" run has turbo_module.name and turbo_module.method set to empty strings, 8 lines in total. The "with" run has none.
    • Both runs crashed natively once, as the scenario intends.
    • Screenshots work with the full google_apis image. They show the TurboModule screen with "Status: Done". They are 320 pixels wide, the emulator's default profile.
    • The two APKs differ where they should. Same JavaScript bundle, different dex files.
    • Disk: 92.9 GB free at the start, 109.5 GB after the cleanup action, 89.1 GB at the end.
    • The event ids are in the device log, which is what Test fetching a run's Sentry events in the workflow, for Junior to read #7127 plans to use.

    Changes needed for Linux

    • The disk check uses /, not the macOS data volume.
    • The build passes -PreactNativeArchitectures=x86_64 to scripts/build-android.sh directly, because yarn build-android-release drops extra arguments.
    • The emulator is a google_apis x86_64 image, not the ATD image the Android tests use.
    • fix(core): Remove native scope tags set to an empty value #7087 changes no JavaScript, so the stale-bundle check only showed that the bundle is readable on Linux.

    Still open

    • Confirm both events in Sentry. Run ids: pr7087-without-20261127-1123 and pr7087-with-20261127-1125. So far the evidence is the device log only.
    • A run with a cold Gradle cache, for the worst-case build time.
    • Junior starting a workflow and reporting back by timer, using ios-crash-screenshot-no-freeze.yml.
    • Boot time of the ATD image, for comparison. It can be read from the existing Android test job.
  5. antonis commented on Nov 27, 2026

    @antonis
    ContributorAuthor

    Linux spike: events in Sentry

    I checked the two native crash events from workflow run 45988566306 (#7128), which ran the #7087 example flow on a Linux runner. Each was opened through its issue-event URL and read from the event detail.

    Run Event verify.commit turbo_module.name turbo_module.method
    Without the change (pr7087-without-20261127-1123) d816b7aa 46c34e3-a988643 null null
    With the change (pr7087-with-20261127-1125) b45b2e3b 46c34e3 absent absent

    Both are platform: java, a RuntimeException from RNSentryModuleImpl.crash with UncaughtExceptionHandler / handled: false, on an sdk_gphone_x86_64 Android 11 emulator, with sample 8.37.0+117. Neither event has any other turbo_module.* tag.

    The local events linked in #7100 show the same pattern: without has both tags with null values, and with has no turbo_module.* tags. Those ran on an arm64 Android 17 emulator with 8.36.0+116.

    The Linux run reproduces the local result: turbo_module.* tags with null values without the change, and none with it.

  6. sentry-junior commented on Nov 27, 2026

    @sentry-junior
    Contributor

    Results

    The Linux runs went through the throwaway workflow on chore/verify-pr-linux-spike (#7128).

    1. Cold vs warm Gradle cache

    These numbers come from results.json in each run's artifact. The cold run had cache-disabled: true on setup-gradle; the yarn cache was still restored.

    Warm (45988566306) Cold (45991531787)
    Clean build (without #7087) 377 s 495 s
    Incremental build (with #7087) 32 s 34 s
    Emulator, step start to script start 91 s 95 s
    Run without 92 s 89 s
    Run with 69 s 71 s
    Whole job 825 s 920 s
    Free disk: start / after cleanup / after builds / end 92.9 / 109.5 / 94.5 / 89.1 GB 93.4 / 109.9 / 94.9 / 89.6 GB

    Both runs show the same device evidence. Without #7087, the native crash event has turbo_module.name: "" and turbo_module.method: "" in logcat. With #7087, those tags are absent. The dex differs between the two sides and the JS bundle is identical. Maestro passed on all four runs, and the screenshots from the full image are usable.

    See the first comment for the plan.

    The events weren't checked in Sentry. Junior's Sentry connection gets a 403 on sentry-sdks. The crash event ids from the warm run, taken from logcat, are d816b7aa3ccb4e9a9250503697ec211d (without) and b45b2e3b2ebb4c83813958a9f5234b47 (with).

    Linux changes to the skill's commands: only the disk check, which reads df -h / instead of the macOS-only /System/Volumes/Data. adb, Maestro, unzip -p and LC_ALL=C grep -a ran as written. The build calls scripts/build-android.sh -PreactNativeArchitectures=x86_64 directly. That is a speed choice, not something Linux needs: yarn build-android-release drops extra arguments.

    2. Junior dispatch test

    • Start allowed: yes. gh workflow run ios-crash-screenshot-no-freeze.yml --ref main exited 0 at 11:34:04 UTC and created run 45991529437. It succeeded.
    • Run times: created 11:34:04 UTC. The verify job started at 11:36:00, after about 2 minutes in the macOS queue. The run ended at 11:47:05.
    • Checked: 11:50:21 UTC with gh run view, 3 min 16 s after the run ended. The dispatched run sent no event. The check ran early because a check-suite event on ci(android): Add throwaway workflow to run verify-pr on a Linux runner #7128 woke Junior. The timer alone would have checked at 11:52:32, about 5.5 min after the end.
    • Reported: this comment, posted about 4 minutes after the run ended.

    3. ATD vs google_apis boot time

    This is the time from Starting emulator. to Emulator booted. in the android-emulator-runner log, at API 30 on ubuntu-latest.

    Image Runs Boot
    aosp_atd (Sample Application, Test android, main) 45983721854, 45979777206, 45852255197 50.2 s, 50.3 s, 50.3 s
    google_apis x86_64 (spike) 45988566306, 45991531787 34.6 s, 32.4 s

    The full image booted about 16 s faster than ATD. The 91 s reported earlier covers more than the boot: it starts at the emulator step and also includes installing the system image (about 26–33 s on both images), creating the AVD and the post-boot settings. Measured the same way, from step start to booted, ATD took 97–127 s and google_apis 84 s.

  7. antonis commented on Nov 27, 2026

    @antonis
    ContributorAuthor

    Summary

    The verify-pr Android steps work on a Linux runner, and Junior can start a workflow in this repo and report back when it ends.

    Results

    Question Answer
    Does the run reproduce the local result? Yes. Both events are in Sentry: turbo_module.* tags with null values without #7087, none with it (details)
    How long does a run take? 13 min 45 s with a warm Gradle cache, 15 min 20 s with the cache disabled
    Clean and incremental build 6 min 17 s (8 min 15 s cold) and about 33 s
    Do screenshots work? Yes, with the full google_apis image. It also boots faster than the ATD image: about 33 s against 50 s
    Is there enough disk? Yes. 89 GB free at the end
    What had to change for Linux? Only the disk check
    Can Junior start a workflow here? Yes. It started ios-crash-screenshot-no-freeze.yml on main and the run succeeded
    Does Junior report back without being asked? Yes, by timer. It checked 3 min 16 s after the run ended; by timer alone it would have been about 5.5 min. A dispatched run sends it no event
    Are the event ids in the device log? Yes. Junior picked the same two crash events from the log that were confirmed in Sentry

    Full numbers: the first run and Junior's report.

    Not done here

    Left in place

    Next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions