Skip to content

ci(android): Run UI tests incl. replay on API 30 in AGP matrix, drop Sauce Labs UI job - #6492

Merged
romtsn merged 7 commits into
mainfrom
jr/ci/agp-matrix-api35-replay
Nov 6, 2026
Merged

romtsn merged 7 commits into
mainfrom
jr/ci/agp-matrix-api35-replay

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

📜 Description

Moves the sentry-uitest-android suite fully onto GitHub Actions emulators and drops the Sauce Labs Ui tests job (integration-tests-ui.yml).

  • AGP matrix: now runs on API 30 google_apis (-memory 4096 -gpu auto) instead of API 30 aosp_atd, and without -Denvironment=github. So ReplayTest, ReplaySnapshotTest and the replay part of UserFeedbackUiTest now run there.
  • Replay snapshot upload: moves to the AGP matrix. Each cell pulls the PNGs that ReplaySnapshotTest writes (scripts/test-ui-android.sh). Only the AGP 9.4.0 × integrations: true cell uploads them with sentry-cli snapshots upload, and only for non-fork runs, same as before.
  • Environment check removed: the BuildConfig.ENVIRONMENT field and the github checks are gone. ReplayTest and UserFeedbackUiTest now gate on isReplayAvailable() instead, because the integrations: false cells don't ship sentry-android-replay. ReplaySnapshotTest lives in androidTestReplay, which only compiles with integrations, so it needs no gate.
  • Removed: .sauce/sentry-uitest-android-ui.yml. The Sauce Labs section of the uitest README is replaced. The macrobenchmark job still uses Sauce Labs and is unchanged.

💡 Motivation and Context

The Sauce Labs UI job has a p90 near 50 min and often fails with no device available. With GH emulators, integration-tests-ui.yml (as proposed in #5639) would duplicate the AGP 9.4.0 × integrations: true cell, which runs the same command on the same build config.

Replay tests were skipped on GH emulators because "they can't capture screenshots". The experiment in #6490 showed that only holds for ATD images:

  • API 35 google_apis, -gpu auto and swiftshader_indirect: PixelCopy returned a real frame.
  • API 30 aosp_atd: PixelCopy failed with ERROR_SOURCE_NO_DATA (3).

Supersedes #5639.

💚 How did you test it?

CI on this PR. The AGP matrix cells are the test. ReplayTest (LeakCanary) and UserFeedbackUiTest with replay haven't run on a GH emulator before, so watch them for flakiness.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

Once this is green, #5639 and #6490 can be closed.

#skip-changelog

via roman.

--

View Session [Sentry]

…Sauce Labs UI job

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
@sentry

sentry Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.63.0 (1) release

⚙️ sentry-android Build Distribution Settings

@romtsn
romtsn marked this pull request as ready for review November 6, 2026 12:24
@romtsn
romtsn requested review from a team and adinauer as code owners November 6, 2026 12:24
@romtsn
romtsn requested review from markushi and runningcode and removed request for a team November 6, 2026 12:24

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread .github/workflows/agp-matrix.yml Resolved

@runningcode runningcode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice!

Comment thread .github/workflows/agp-matrix.yml Resolved
Comment thread .github/workflows/agp-matrix.yml Resolved
…fail

android-emulator-runner runs each script line in its own shell and stops at
the first failing line, so a failing connectedReleaseAndroidTest skipped the
snapshot pull. Run the tests and the pull from one script that exits with the
tests' status.

#skip-changelog
Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>

#skip-changelog
API 30 google_apis captures replay frames with PixelCopy (verified in
#6495) and avoids the Android 15 ART method-tracing crash that the
profiling tests hit on API 35.

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ada4b87. Configure here.

Comment thread .github/workflows/agp-matrix.yml Resolved
@romtsn romtsn changed the title ci(android): Run UI tests incl. replay on API 35 in AGP matrix, drop Sauce Labs UI job ci(android): Run UI tests incl. replay on API 30 in AGP matrix, drop Sauce Labs UI job Nov 6, 2026
sentry-junior Bot and others added 3 commits November 6, 2026 13:27
… timeout

The emulator skip was added in #3074 because the timed-out profile's
trace file was sometimes missing on emulators. Since #3478 timed-out
profiles are discarded and the test asserts no profile is sent, so it
no longer reads a trace file. Drop the skip, and add a test-only hook
to shorten the 30s profiling timeout so the test waits 5s instead of 35s.

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
The test only checks that a timed-out transaction profile is discarded,
which AndroidProfilerTest and AndroidTransactionProfilerTest already cover.
It was skipped on emulators, so nothing in CI ran it after the Sauce Labs
job was removed. Also reverts the test-only profiling timeout hook.

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
@romtsn
romtsn merged commit 1b8668a into main Nov 6, 2026
42 of 43 checks passed
@romtsn
romtsn deleted the jr/ci/agp-matrix-api35-replay branch November 6, 2026 14:17
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