Skip to content

ci(replay): Test Session Replay against Compose UI versions from a checked-in file - #6638

Merged
romtsn merged 10 commits into
mainfrom
ci/compose-ui-matrix
Nov 20, 2026
Merged

romtsn merged 10 commits into
mainfrom
ci/compose-ui-matrix

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

📜 Description

This replaces the hardcoded composeUiTestVersions build types from #6626 (composeUi112, composeUi113) with a Compose UI matrix:

  • gradle/compose-ui-versions.json lists the Compose UI versions to test:
    • the oldest version the replay tests support, 1.8.3. It pins material3 to 1.3.2, because the catalog's material3 1.4.0 needs a newer Compose UI.
    • the latest stable.
    • the latest pre-release, if it's newer.
  • A new build-logic plugin for Android library modules, io.sentry.dependency-matrix, reads a versions file from gradle/ and registers a <name>Test<version> task for each version, such as composeUiTest1_13_0_rc01, and a <name>Test task that runs them one after another. Each version task runs the module's unit tests with every dependency in the given groups at that version:
    dependencyMatrix {
      matrix(
        name = "composeUi",
        groups = listOf("androidx.compose.ui", "androidx.compose.foundation", "androidx.compose.animation", "androidx.compose.runtime"),
        versionsFile = "compose-ui-versions.json",
      )
    }
    • An entry is either a version string or an object such as {"version": "1.8.3", "pin": {"androidx.compose.material3": "1.3.2"}}. The object form also forces each group in pin to its own version, for test dependencies whose current version needs a newer one.
    • Each version gets its own build type, based on the test build type, because AGP builds the R class and test resources from the variant's dependencies.
    • The tests compile and run against the matrix versions, because the Compose compiler emits calls into the Compose runtime that older versions don't have. Main code still compiles against the catalog, like the published artifact.
    • The matrix unit tests are kept out of test/check, so the required Build Job only runs the release unit tests.
  • .github/workflows/compose-ui-matrix.yml runs :sentry-android-replay:composeUiTest --continue in one job on PRs and on pushes to main, so the workflow doesn't list the versions itself.

The same commit always tests the same versions. A new Compose release comes in as a change to the JSON file.

💡 Motivation and Context

Session Replay calls Compose internals whose mangled JVM names change between Compose versions. Adding or removing a version is now a one-line change to the JSON file, and other Android dependencies (e.g. Room) can reuse the plugin.

The replay tests can't go below 1.8: on 1.7 they don't compile, because they mock LayoutNode.semanticsConfiguration.

Trade-off: check still compiles the matrix variants, because verifyMethodParameters reads every variant's AAR. That's the same as on main today.

📝 Checklist

  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Once this merges, a daily Junior automation bumps the latest stable and pre-release entries in gradle/compose-ui-versions.json when Google Maven has a newer Compose UI version, and keeps the oldest-version entry as it is. It force-pushes chore/update-jetpack-compose-ui-tests and asks @getsentry/team-mobile-android-sdk to review. Dependabot can't update a custom JSON file, and getsentry/github-workflows/updater only follows git tags, which AndroidX doesn't publish for Compose.

#skip-changelog

via roman, no.

--

View Session [Sentry]

…s from Google Maven

Replace the hardcoded composeUi112/composeUi113 build types with a
Compose UI matrix workflow. Like the AGP matrix in
sentry-android-gradle-plugin, a Kotlin script reads
androidx.compose.ui:ui's maven-metadata.xml and picks the latest stable
and, when newer, the latest pre-release. Each matrix job runs the replay
unit tests with VERSION_COMPOSE_UI forcing that version on the test
runtime classpath. The workflow also runs daily, so new Compose releases
are tested without a version bump PR.

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

sentry Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

sentry-junior Bot and others added 2 commits November 17, 2026 11:32
GitHub only notifies the workflow's creator about scheduled runs, which
is the bot that pushed it, so a failing daily run would go unnoticed.
On a scheduled failure, open an issue, or comment on the open one so
repeated failures stay in one place.

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
Like the Spring Boot matrix, keep the Compose UI versions in
gradle/compose-ui-versions.json instead of looking them up on Google
Maven on every run, so the same commit always tests the same versions.
Drop the daily schedule and its failure issue, which only made sense
with the live lookup.

Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
@sentry-junior sentry-junior Bot changed the title ci(replay): Test Session Replay against the latest Compose UI versions from Google Maven ci(replay): Test Session Replay against Compose UI versions from a checked-in file Nov 17, 2026
…ency matrix plugin

Adds io.sentry.dependency-matrix, which reads a versions file in gradle/ and
registers <name>Test<version> tasks. Android modules get a build type per
version, kept out of check; JVM modules reuse the compiled tests on a
versioned runtime classpath. The workflow reads the file with jq inline,
like the Spring Boot matrix workflows.

Co-Authored-By: roman <roman.zavarnitsyn@sentry.io>
Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>
@romtsn
romtsn marked this pull request as ready for review November 20, 2026 09:59
@romtsn
romtsn requested review from a team and adinauer as code owners November 20, 2026 09:59
@romtsn
romtsn requested review from romtsn and runningcode and removed request for a team November 20, 2026 09:59
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit 8bb6ff7.

The model rated this change low. It was raised to medium because:

  • R6: build or release configuration changed: .github/workflows/compose-ui-matrix.yml, build-logic/build.gradle.kts, build-logic/src/main/kotlin/io/sentry/gradle/DependencyMatrixPlugin.kt, gradle/compose-ui-versions.json, sentry-android-replay/build.gradle.kts
  • R7: the model was not confident enough that the change is low

This label is a hint for reviewers, not an approval.

Comment thread gradle/compose-ui-versions.json 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.

Yes please!

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

we might also want to put a commetn somewhere that when we can use AGP test suites we should double check this solution

@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026
Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026
Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>
@github-actions github-actions Bot removed the risk: medium PR risk score: medium label Nov 20, 2026
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 20, 2026
Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026
Co-Authored-By: Nelson Osacky <nelson.osacky@sentry.io>
Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Nov 20, 2026
@romtsn
romtsn merged commit e1f8393 into main Nov 20, 2026
51 checks passed
@romtsn
romtsn deleted the ci/compose-ui-matrix branch November 20, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants